Skip to content

Commit 2e08119

Browse files
Add URL check to conditional profile
As suggested in po5#12 (comment)
1 parent bd3d8c9 commit 2e08119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Below is an example to exclude files when "MyCunnyFolder" or "MyCunnyFolder2" is
5454
This goes in `mpv.conf`.
5555
```ini
5656
[dont-log-my-porn]
57-
profile-cond=(function() local ignored, path = {"mycunnyfolder"}, require "mp.utils".join_path(get("working-directory", ""), get("path", "")):sub(1, -get("filename", ""):len()-1):lower() for _, ig in ipairs(ignored) do if path:find(ig, 1, true) then return true end end end)()
57+
profile-cond=(function() local ignored, path = {"mycunnyfolder"}, get("path", "") path = (path:find("^%a[%w%.%-%+]-://") and path or require "mp.utils".join_path(get("working-directory", ""), path)):sub(1, -get("filename", ""):len()-1):lower() for _, ig in ipairs(ignored) do if path:find(ig, 1, true) then return true end end end)()
5858
profile-restore=copy-equal
5959
script-opts-append=memo-enabled=no
6060
```

0 commit comments

Comments
 (0)