Open
Conversation
the scripts_dir detection logic uses `mp.find_config_file("scripts")` which
returns `$XDG_CONFIG_HOME/mpv/scripts` even if the plugin is installed globally
under `/etc/mpv/scripts`.
fix this by using `mp.get_script_directory()`, which requires the install the
plugin in a `script directory`, but that is recommended anyway for plugins like
this one: https://mpv.io/manual/master/#script-location
Signed-off-by: Robert Günzler <r@gnzler.io>
Author
|
i guess this kind of depends on #17 |
Owner
|
Wouldn't |
Author
|
yeah that seems to work as well... |
Out of curiosity, is there a particular reason? Glancing through Repology, mpv 0.33 (or later) seems to be in all currently-supported releases of all major software distributions. I'm asking because it adds some complexity downstream instead, both for users who manually clone the repo and copy/symlink files into place, and for distro packagers; granted, IDK of anyone packaging mpv scripts outside of us in nixpkgs. |
nicoonoclaste
added a commit
to nicoonoclaste/mpv_sponsorblock
that referenced
this pull request
May 1, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the scripts_dir detection logic uses
mp.find_config_file("scripts")whichreturns
$XDG_CONFIG_HOME/mpv/scriptseven if the plugin is installed globallyunder
/etc/mpv/scripts.fix this by using
mp.get_script_directory(), which requires the install theplugin in a
script directory, but that is recommended anyway for plugins likethis one: https://mpv.io/manual/master/#script-location