Migrating from Songbird to Rhythmbox

Once upon a time a company created Songbird. A music player designed to supplant all other music players and have Linux compatibility with iPod support. So we set Jess up with it and she started using it to organize and play her music. And it was good.

Mostly.

Turned out that the iPod support was flaky at best, but they were supposedly working on it. Then Songbird announced that they were dropping iPod support. A few months went by and then Songbird announced they were dropping Linux support. So now they're just another music player in a sea of existing and mature players with nothing much to distinguish them from the rest.

So lacking iPod support and getting no further updates for the Linux version we needed a new solution for Jess' music needs. However, she'd already gone through all the hassle of getting her music library setup just right in Songbird with all her ratings and playcounts and playlists. Since she has several thousand songs she didn't want to try to redo all that by hand.

Being the master of computer science that I am I decided to take it upon myself to figure out how to automagically migrate her music out of Songbird and in to Rhythmbox. (When combined with Gtkpod these 2 make an acceptable and working solution for music management and iPod syncing.)

Unfortunately, for unknown reasons neither system used any kind of normal standard for storing their data. Well, that's not entirely true. Most of the data is just fine. But file location data was a mess. Songbird stored it in some weird convoluted ascii encoding of unicode. Rhythmbox stores it in some randomly/partially url-encoded form of unicode. But lacking any clear documentation on the matter I had to reverse-engineer both formats. It was a pain.

But I did it! And now for your benefit I present my automagic music migrator to get you successfully and as painlessly as possible from Songbird to Rhythmbox.

I'm hosting this project on Github: http://github.com/kdickerson/Export-from-Songbird

Download the file songbird_to_rhythmbox.py file and then run it:

#python songbird_to_rhythmbox.py

or make it executable and run it:

#chmod +x songbird_to_rhythmbox.py
#./songbird_to_rhythmbox.py

It will ask you 2 questions. 1. What user you'd like to migrate (the default is the current user, so most people will just hit enter). and 2. If you would like the script to overwrite your existing rhythmbox library or just output the migration to a new file for you.

I wrote and used the script with Python 2.6.5

What this script WON'T do:
It won't migrate playlists. Jess already had an export function for playlists in Songbird and exporting the playlists as M3Us and then importing to the migrated Rhythmbox worked with only a very small percentage of errors for files with special characters.

I thought about spending the time to automate migrating playlists, but I don't feel like it. Rhythmbox stores playlists in another xml file and Songbird stores them in the same database as the other data, so you can use my script as a guide to write your own playlist migrator if you'd like.

5 thoughts on “Migrating from Songbird to Rhythmbox”

  1. This sounds like a brilliant script, tried following your instructions to run it though and just got:

    Traceback (most recent call last):
    File "./songbird_to_rhythmbox.py", line 7, in
    from pysqlite2 import dbapi2 as sqlite
    ImportError: No module named pysqlite2

    Do I need to have it in a particular directory or modify it in any way? Sorry if these are stupid questions. Thanks

  2. Thanks worked perfectly! Any idea why there's no common standard for saving/exporting/importing playcounts and ratings like you with playlists as m3u?

  3. How difficult would it be to modify the script so that it sums the playcounts of both players rather than replacing one with the other? If not very how would I do this? Thanks very much.

  4. I think the idea of tracking ratings and playcounts just wasn't something people normally did until the advent of iTunes when Apple finally strong-armed music companies into selling music online.

    Since Apple doesn't have any interest in being interoperable they never attempted to make a standard way of sharing that data. Last I checked (last year) iTunes wouldn't even read .m3u or .pls files which I find insane.

    -----

    In order to sum the playcounts you'd need to read in the existing data for Rhythmbox and match up the correct song. If you could trust the data to be identical it wouldn't be terribly hard (if you are an experienced programmer and know Python), but it would require a bit of work to modify the script to do that.

    I don't have any plans of implementing that behavior, sorry.

Leave a Reply

Your email address will not be published. Required fields are marked *