-
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
Use paths relative to music directory #133
Comments
I'm also very interested in relative paths. I have my library on a NAS and share it across several computers; while the path is the same on all computers, it differs from the path on the NAS. Ideally I would use only one beets installation on the NAS, but it has an old ppc cpu, so it's not ideal to compute replaygain info. Also getting gstreamer to compile on it is quite an ordeal. |
I also like beets to store relative path in the database (starting from the library path from the config file). I had to relocate my Music directory sevral times and I haven't found a good way to do this yet as the full path are stored. As a side effect, it would also probably reduce the size of the database a bit and make network-shared library easier. |
This comment has been minimized.
This comment has been minimized.
Also interested in this. I recently had to dismantle my NAS, and add its hard drive (with the beets library) on my computer, ie on a different path. I had to import it all again. |
Also interested in this, was surprised to find out this wasn't the default. |
@sampsyo : what's your opinion here? |
Relative paths would probably be good idea. The problem is that this would be a deceptively large change -- path handling is extremely pervasive in beets, so the changes would not be localized. It's possible the transition would be easier if we did #1409 (pathlib) first. |
This would be great, I use syncthing to share music between 4 devices, each with a different |
While it's simple (if you understand SQL) you can change your path like this:
But it would really be great to have relative paths stored. |
I think I used a docker container one time to have a "relative path", when organizing the music on a external usb drive, on two computers. The idea was having a layer between the beets and the data. |
Just ran into this issue after moving to a new computer. Ran |
Really surprised to find out that relative paths aren't supported, now as I stumbled at this portability issue myself. |
Since I first noticed about this a few years back I just put all my music at "/media/music/library". Its kind of a pain, but I think switching to relative paths could be quite difficult :/ |
Another possibility might be a second |
What has worked for me at the moment is this (make a backup of the DB first of course): sqlite3 ~/.beets.db "UPDATE items SET path = replace(path, '/mnt/old_folder', '/mnt/new_folder');" |
If your albums also point to externally stored cover art you can update these with sqlite3 ~/.beets.db "UPDATE albums SET artpath = replace(artpath, '/mnt/old_folder', '/mnt/new_folder');" |
Is there any recommended way on how to have the music and the library stored in the NAS? For now, I am will try to store the music in the NAS and having the Edit: I think I was able to have the Edit 2: |
While changing the database does work, it's not a great solution for synchronizing a library between machines, especially when they have different OSes or usernames. I hacked together a fix by modifying the I would be a lot more confident in code working if we were using pathlib for paths, instead of handing around bytes and strings. (my "quick hack", probably buggy: artemist@a53fe00) |
This issue was automatically migrated from Google Code.
Original author: [email protected] (August 30, 2012 00:17:11)
Original issue: google-code-export/beets#432
The text was updated successfully, but these errors were encountered: