-
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
Error when library database directory doesn't exist #3808
Comments
I think this is intended behaviour, since it is quite common to have a music collection including the database on an external disk. When beets is accidentally run when the external drive is disconnected, no such parent directories should be created. I don't think there's an easy solution to detect whether this is the case (except for adding a configuration option to indicate that the collection is removable, but I'd say that's not really an improvement over creating the folder manually). Semi-related: #1934 |
@wisp3rwind Thanks for the reply. To be clear, unlike the linked issue this is not about the music collection itself but about the database ("library", the key used in the config, isn't the clearest of names). But I guess people could have their database also on an external drive together with the music collection? If that's really a thing that happens wouldn't it make more sense to show a message saying no database was found and ask if it should be created? When answering yes the missing directories can be created as well. |
Thanks for the clarification, and sorry for the belated reply! I did understand you correctly initially already. At least I have the db located next to my music collection. To be honest, I have no idea what is generally more common among beets users. So, I'd prefer not to create files/directories in that situation automatically.
Adding a prompt in that situation sounds very reasonable, we could add that. If you (or anyone else) would open a PR, that'd be perfect! |
Hi, I added this feature as well as test cases for it. Here is my pull request. I am trying to test on a ubuntu server, But somehow I cannot run tox successfully
|
Fixed in #4327 |
Indeed; thanks!! |
Problem
When the directory the library database is contained in doesn't exist yet beets throws an error:
Expected behavior:
Beets creates the required (parent) directories
Version info: Current master (ed18551)
The text was updated successfully, but these errors were encountered: