Happy Birthday to Me

June 12, 2010 9:56 pm

Wednesday was my birthday. It started out with an exciting day at work where I fixed bugs and watched Google lectures on Map Reduce.

I get to come home for lunch which is nice and when I came in the door I discovered Jess had decorated for me!IMGP2471

After work I went and used the gift certificate Jess gave me at Christmas for a massage. My shoulders and lower-back had been rather tweaked so getting those knots worked out was rather nice.

Then I went home and waited around for Jess to get home from cub scouts so we could go to dinner. We went to Black Angus steakhouse in Dublin which was pretty good. They sang a birthday song and brought a giant cookie-ma-jig which was very tasty.

Jess made me a lovely chocolate with chocolate frosting cake:IMGP2472After dinner I blew out candles, but we were both too full to eat any cake.

IMGP2477Jess ordered me a really nice frame to put my diplomas in. They’ve just been sitting in a box ever since I got them and I’ve been wanting to do something with them. So we put them in the frame and I took it to work and put it in my office which is nice. It’s almost like I’m a professional!

IMGP2497Thanks for all the birthday wishes and gifts. One year ago was a very different time. I was still in Provo, unmarried, still in grad school. Quite a change in my life from 24 to 25. It’s been a great year, here’s to another for 25 to 26.

Migrating from Songbird to Rhythmbox

June 4, 2010 4:40 pm

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.