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 #133

Open
ghost opened this issue Feb 28, 2013 · 10 comments
Open

Use paths relative to music directory #133

ghost opened this issue Feb 28, 2013 · 10 comments

Comments

@ghost
Copy link

@ghost ghost commented Feb 28, 2013

This issue was automatically migrated from Google Code.
Original author: jherl...@gmail.com (August 30, 2012 00:17:11)
Original issue: google-code-export/beets#432

@alucryd

This comment has been minimized.

Copy link

@alucryd alucryd commented Jul 22, 2014

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.

@PierreRust

This comment has been minimized.

Copy link
Collaborator

@PierreRust PierreRust commented Jul 23, 2014

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.

@maxammann

This comment was marked as off-topic.

Copy link
Contributor

@maxammann maxammann commented May 10, 2015

+1

@barsanuphe

This comment has been minimized.

Copy link
Contributor

@barsanuphe barsanuphe commented May 11, 2015

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.
Looking back, I should have done a beet move before switching the hard drives, but I had assumed only relative paths were used, since beets knows the library path.

@danlamanna

This comment has been minimized.

Copy link

@danlamanna danlamanna commented Feb 12, 2016

Also interested in this, was surprised to find out this wasn't the default.

@jrobeson

This comment has been minimized.

Copy link
Contributor

@jrobeson jrobeson commented May 19, 2016

@sampsyo : what's your opinion here?

@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented May 19, 2016

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.

@naggie

This comment has been minimized.

Copy link

@naggie naggie commented Aug 12, 2017

This would be great, I use syncthing to share music between 4 devices, each with a different directory. It would be nice to be able to share the config and library database.

@awenny

This comment has been minimized.

Copy link

@awenny awenny commented Aug 20, 2017

While it's simple (if you understand SQL) you can change your path like this:

update items set path = '/Newpath' || substr(path, <startposition>) where path like '/Oldpath%' if opening your library file with the CLI sqlite3 (or other sqlite client).
Also for the artpath: update albums set artpath = '/Newpath' || substr(artpath, <startposition>) where artpath like '/Oldpath%'.
First check, if what you're updating to is what you intended: select path, '/Newpath' || substr(path, <startposition>) from items where path like '/Oldpath%'.
The percent sign (%) acts like an asterisk (*) in the file system. Unfortunately, this is only a one-time task. Or you need to run it every time before you execute beets with a different path configuration.

But it would really be great to have relative paths stored.

@GuilhermeHideki

This comment has been minimized.

Copy link
Member

@GuilhermeHideki GuilhermeHideki commented Dec 3, 2018

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.
For example, on Windows, the path was /music = D:\music, but on Linux was /music = /mnt/music

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.