Mostrando entradas con la etiqueta Multiple Music Libraries. Mostrar todas las entradas
Mostrando entradas con la etiqueta Multiple Music Libraries. Mostrar todas las entradas

viernes, 21 de enero de 2011

Mantain more than one music library in Rhythmbox

This is a really strange requirement but there are sometimes that you may want to mantain two separate libraries using the same linux user. In my case, I have one library in /home/myUser/Music and other one in /home/myUser/MusicLowQuality. This is usefull because I mantain a second version of all my music in a lower quality for syncing my mp3 player. The problem starts when you import this two folders to Rhythmbox because you will have a duplicate of every single song.

The Rhythmbox Library Database is stored in ~/.local/share/ryhtmbox/rythmdb.xml by default but you can invoke rythmbox this way to take any file you want:


rhythmbox --rhythmdb-file=/home/myuser/.local/share/rhythmbox/mynewdb.xml


This way you can create two diferent launchers that target to two different music libs. This is terrific but I found just one annoying behaivior. If you have the auto-inspect option enabled pointing to /home/myUser/Music and invoke the launcher that use the LowQuality folder when you include new music files to /Music they will be included in the wrong lib. This is a little difficult to explain :3

The easiest solution that I found was changing the path to the inpection folder before calling the launcher.

you can invoke rythmbox this way to take any file you want:


gconftool -s /apps/rhythmbox/library_locations -t list --list-type string [file:///home/myUser/MusicLowQuality] && rhythmbox --rhythmdb-file=/home/myuser/.local/share/rhythmbox/lowqualitydb.xml

gconftool -s /apps/rhythmbox/library_locations -t list --list-type string [file:///home/myUser/Music] && rhythmbox --rhythmdb-file=/home/myuser/.local/share/rhythmbox/normaldb.xml


I hope this can be useful for someone :)