The image shows the default RadioTray radio stations imported into Rhythmbox
How did I do that?
RadioTray holds its radio-stations in an XML file located in:
~/.local/share/radiotray/bookmarks.xml
Rhythmbox holds all of its data similarly in an XML file located in:
~/.local/share/rhythmbox/rhythmdb.xml
If you examine both files its pretty obvious that the XML format (its defined structure) is very different.
One solution is to transform the Radiotray XML format to something that Rhythmbox can understand.
XSLT
You can use the structured XML translation language XSLT to perform this conversion.
To install:
sudo apt-get install python-4suite-xml
Next copy the contents below into a new gedit
file
Save in a file (create the folder xml
if necessary) called ~/xml/style
Next, copy the RadioTray XML file to the same folder ~/xml
Finally, copy the Rhythmbox XML file to the same folder ~/xml
Drop to a terminal:
cd ~/xml
4xslt bookmarks.xml style > test.xml
This will reformat the RadioTray into the XML that can be read by RhythmBox
Next we need to add this new data to Rhythmbox.
Now open both test.xml
and rhythmdb.xml
Copy the contents of test.xml
EXCEPT for the first line into the rhythmdb.xml
file. Note - you paste the contents at the end of the file i.e.
</entry>
*****paste test.xml here*****
</rhythmdb>
Save.
Backup the old rhythmdb.xml
file and then copy over the new rhythmdb.xml
file.
Fire up Rhythmbox
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="bookmarks/group/group/bookmark">
<entry type="iradio">
<title><xsl:value-of select="@name"/></title>
<genre><xsl:value-of select="translate(../@name,'','')"/></genre>
<artist></artist>
<album></album>
<location><xsl:value-of select="@url"/></location>
<date>0</date>
<media-type>application/octet-stream</media-type>
</entry>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
It probably that you need to trick apt
to reinstall the library even though its already installed. This should force the correct symlinks such as you have reported to be recreated corrected.
Take for example this:
dad@dad-VirtualBox:~$ sudo apt-get install librhythmbox-core7
Reading package lists... Done
Building dependency tree
Reading state information... Done
librhythmbox-core7 is already the newest version.
The following package was automatically installed and is no longer required:
cmake-data
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
As you can see, a simple install of the package librhythmbox-core7
will not work.
dad@dad-VirtualBox:~$ sudo apt-get --reinstall install librhythmbox-core7
[sudo] password for dad:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
cmake-data
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/457 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 195782 files and directories currently installed.)
Preparing to replace librhythmbox-core7 2.99.1-0ubuntu1 (using .../librhythmbox-core7_2.99.1-0ubuntu1_amd64.deb) ...
Unpacking replacement librhythmbox-core7 ...
Setting up librhythmbox-core7 (2.99.1-0ubuntu1) ...
Processing triggers for libc-bin ...
dad@dad-VirtualBox:~$
By using sudo apt-get --reinstall install librhythmbox-core7
, apt will go a fetch a new copy and install the library.
In a similar manner you can also force a download and reinstallation of all the core rhythmbox packages:
sudo apt-get --reinstall install gir1.2-rb-3.0 librhythmbox-core7 rhythmbox rhythmbox-data rhythmbox-mozilla rhythmbox-plugin-cdrecorder rhythmbox-plugin-zeitgeist rhythmbox-plugins
Best Answer
When you select your directory in the preferences, it automatically reverts to "multiple locations". This is because there is at lease one other location set automatically by the Ubuntu One Music Store:
Now, don't delete this directory :-)
You can check what directories are set as library locations by opening the gconf-editor (hit Alt+F2 and type
gconf-editor
), then navigate toapps
→rhythmbox
and check the "library locations" key.This is what it should look like after you've set your library location to ~/Music:
I recommend you just leave it there, and just use the gconf-editor to make sure there aren't any other locations set. But you can also delete the u1 music store entry (though I wouldn't be surprised if the ubuntu one plugin just added it again).
In case you do decide to delete either the directory, the gconf entry for it, or both, be safe in the knowledge that you can't break anything by doing that, none the less, you may as well just leave them be; in case you decide to use the Ubuntu One Music Store one day. They don't slow down Rhythmbox at all; you won't even know they're there.