-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beets should respect $XDG_MUSIC_DIR #5168
Comments
While I love the XDG directory specification, I've seen it cause a lot of trouble in other open-source projects due to backward compatibility issues. I expect that anybody who sets
|
Those users who have set this variable will use a non-standard configuration anyways, so I would not be concerned with backwards compatibility - that is only a problem if the fallback is not reasonable or the config options are not properly prioritised. However, the right directory to use for xdg is |
XDG_MUSIC_DIR is a part of the standard.
|
If they set XDG_MUSIC_DIR to something other than $HOME/Music then under the preference order I recommended, it would not matter as XDG_MUSIC_DIR would be used and $HOME/Music would never be considered. |
yes, but by default it is not an environment variable unlike the XDG base dirs, as explained in the spec too: ❯ xdg-user-dir MUSIC
/home/janek/data/4-media/music
❯ echo $XDG_MUSIC_DIR
just to keep in mind when implementing |
Oh that makes sense. Thanks for the clarification! |
@sebastianrasor to be more explicit, here's an example: A user has set |
I haven't been able to find any utility to parse |
Note the The |
Fixes beetbox#5168. Beets will now look for a music directory as follows: 1. Configuration in 'config.yaml'. 2. On Unix-like systems, 'XDG_MUSIC_DIR' in 'user-dirs.dirs'. 3. The fallback '~/Music'.
By default beets is configured to use ~/Music unless otherwise specified. I think that the order of preference should be as follows:
The text was updated successfully, but these errors were encountered: