eMusic in Banshee

I’ve been an eMusic customer for many years, and I’m pretty happy with it. Banshee comes with a plugin—courtesy of Eitan—to help download entire albums from eMusic without using their own downloader application. But you have to go search in your browser, and then hope the necessary MIME type handlers are set up to pass the .emx file eMusic gives you to Banshee, and also have remembered to enable the plugin.

Having enjoyed the notorious Amazon store integration, I thought I’d try my hand at something similar for eMusic. Here’s a quick demo video of downloading a couple of albums: one free, one not. Not shown in the video: playing track previews inside Banshee, and downloading invididual tracks.

I’m pleased to say that I wrote approximately no code (which is good, because I don’t really speak C♯): it’s derived from the Amazon store plugin, with most of the code removed. What remains is in a branch on fd.o; I’ve updated bgo#623828 with a link if anyone fancies reviewing this. (I am very tempted to set up a personal cheese and wine fund.)

5 comments ↓

#1 Eitan on 03.15.11 at 10:25 am

Niiice

#2 Bob Bobson on 03.27.11 at 6:15 pm

What’s happened to the post that was made after this one? They one about GQueue?

#3 Will Thompson on 03.27.11 at 10:32 pm

Lost in the great database server crash of 2011.

#4 Bob Bobson on 03.28.11 at 9:57 am

Well can I comment on it here? Your first example was actually O(N), not O(N^2). You are correct that you are appending to the end of a list which would normally have to traverse the whole list. However, you stored the last value in the list each time, so you were always appending to the final item, a constant time operation. After all your discussion and alternate proposals, your original code was O(N) anyway! And there is no such thing as g_queue_append().

You can read about big O notation at http://en.wikipedia.org/wiki/Big_O_notation and GQueue at http://library.gnome.org/devel/glib/unstable/glib-Double-ended-Queues.html. A quick look at both would have helped you find your errors and might have saved you from posting a condescending blog post riddled with your own basic errors.

#5 Will Thompson on 03.28.11 at 10:07 am

You can comment here if you like.

g_list_append returns the new head of the list, not the new tail. So the first example was O(n²), as I stated.

The g_queue_append thinko was pointed out to me by a couple of people shortly after I posted. I had actually corrected the mistake before posting, but then must have confused my Vim buffers and posted the wrong version. Thank you for pointing it out.