Skip to content
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 #432

Open
GoogleCodeExporter opened this issue Mar 13, 2015 · 2 comments
Open

Use paths relative to music directory #432

GoogleCodeExporter opened this issue Mar 13, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

My music collection is in /home/shared/music on my primary workstation. I have 
a symlink in ~/music pointing to that directory. My ~/.beetsconfig (which 
itself is a symlink to ~/music/.beetsconfig) contains:

[beets]
library: ~/music/.beetslibrary.blb
directory: ~/music
...

Problem #1: When I'm importing music, depending on whether I happen to be 
located in ~/music or in /home/shared/music, the database's item.path for the 
imported entries will either start with "/home/johan/music/..." or 
"/home/shared/music/...". This causes problems if I later try to 
re-import/autotag the same music, because it will now try to move it e.g. from 
/home/shared/music/foo/bar/baz.flac to /home/johan/music/foo/bar/baz.flac. 
Since these two path reference the _same_ file, it somehow ends up _deleting_ 
the file!

Problem #2: I'd like to copy (or rather periodically rsync) my entire music 
collection (including the beets database) to my laptop. However, it has a 
different directory structure, so the absolute filenames would not resolve 
there.

Proposed solution for both problems: Would it be possible to store paths in the 
database as relative to the value of the "directory" setting in .beetsconfig? 
Then one copy/move the music folder somewhere else, and beets would still work 
(as long as the beets.directory config was updated accordingly). Also, for the 
above different paths that (via symlinks) actually refer to the same file, 
beets would not attempt to move one to the other, because their relative paths 
(relative to the root of the music collection) would be identical.

Original issue reported on code.google.com by [email protected] on 30 Aug 2012 at 12:17

@untitaker
Copy link

Do not comment here, but on beetbox/beets#133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants