CogentRedTester / mpv-sub-select

An advanced conditional subtitle track selector for mpv player
MIT License
89 stars 8 forks source link

Make code for finding sub-select.json more flexible #24

Closed duxovni closed 1 year ago

duxovni commented 1 year ago

Rather than finding the first mpv config directory that contains script-opts, and then looking inside there for sub-select.json, we should find the first mpv config directory that contains script-opts/sub-select.json.

CogentRedTester commented 1 year ago

Won't this just lead to identical behaviour? I was under the impression that expand-path does not check if paths exist before resolving the expansion.

duxovni commented 1 year ago

The ~~/ prefix is special in this regard. From the manpage:

If the subpath exists in any of the mpv's config directories the path of the existing file/dir is returned. Otherwise this is equivalent to ~~home/.

CogentRedTester commented 1 year ago

Looks good then