Amazon MP3 downloader support in Banshee

The Banshee logo I’m very excited to announce I have just landed support for downloading and importing your Amazon MP3 purchases into Banshee.

It is a simple extension that understands the download queue file that Amazon delivers after a purchase is made. Linux Desktop integration is provided so that your web and file browsers associate Banshee with the download queue file.

Banshee Amazon MP3 support

Further improvements are on the way, but I’ve downloaded many albums in Banshee at this point (and subsequently burned a decent amount of money!) Of course, there are a number of free downloads that Amazon offers, which were good for testing. Unfortunately, I didn’t think to look for these until I had finished the feature.

In addition to the integrated Banshee extension, there is a command line client called bamz. It requires Banshee to be installed for support libraries, but does not integrate with your Banshee library in case you are into that sort of thing. By default, bamz downloads the tracks into your current working directory with the following structure: $PWD/<Artist Name>/<Album Title>/NN. Track Title.mp3.

bamz command line client

I will be merging the Amazon MP3 support into the 1.6 stable series, and it is currently available in Banshee’s git master branch. Enjoy!

This entry was posted in uncategorized and tagged , , , , , . Bookmark the permalink.

22 Responses to Amazon MP3 downloader support in Banshee

  1. Mike says:

    Phenomenal.

  2. mpiroc says:

    I can’t wait to try this out! The Amazon MP3 downloader has always been buggy for me on Linux, and it will be great to have downloads integrated into Banshee.

    What are the chances of ever having a full-fledged Amazon store browser? Like the Ubuntu Music Store plugin, but for Amazon.

  3. Robin says:

    Very very nice!

    bamz prints its name wrong when showing usage:

    % bamz -h
    Usage: amzclient [-o output_dir] amz_files…

  4. Anonymous says:

    Have you arranged an appropriate affiliate setup so that purchases produce some money for FOSS development?

  5. LaHaine says:

    Did you base this on clamz? That what I’m using for downloading from Amazon and I’m very happy with it.

  6. Mark says:

    Yes!!! Thank you so much for this. Awesome news, and I’m really looking forward to trying it out! I’ve recently jumped ship from MacOS, and love Banshee – but I did miss the more integrated nature of iTunes when it came to purchasing songs. Unfortunately, the Ubuntu One music store just isn’t ready for the prime time just yet (no end of hassle with it), but I love the Amazon MP3 store. Their downloader is pretty buggy, and requires all manner of workarounds just to get it to work on a 64-bit system. Having all this integrated into my favourite media player is going to make things so much easier!

  7. At a minimum I think you can expect to see some form of integration of the Amazon MP3 web site into Banshee. This basically will mean a simple jumping-off point for doing things like:

    – Source that displays the web-based Amazon MP3 store home page
    – Source search integration that searches the MP3 store
    – Ensuring the Amazon MP3 site “knows” your system even has downloader support ( e.g. going to http://www.amazon.com/gp/dmusic/after_download_manager_install.html )
    – Intercepting the .amz links after purchase to immediately begin downloading

    After this we’ll pursue tighter integration, but because the payment/authentication needs, for starters just embedding a [somewhat integrated] WebKit browser is the best start.

  8. Nice! The Ubuntu One store plugin has a few neat-ish tricks around injecting JavaScript into the embedded Webkit widget from the external plugin (both the C music-store widget itself, and the Banshee extension that embeds it) that you might find useful for further extending this. Since we went through some of the pain on that front, let me know if you run into problems :)

    (captcha: “commit it”. Ha!)

  9. Rick says:

    Man, thank you so much. Especially for the time to think of us that love our terminals with bamz. Pure awesome. I’ll be looking at the banshee ppa for this shortly.

  10. @LaHaine in no way is this based on clamz; the .amz file format is incredibly simple, and the actual downloading and playlist parsing is easily provided by already existing components in the Banshee framework.

    @Stuart awesome, thanks. It’d be nice to see that code in any regard.

    @Anonymous we’re looking into it. There are some issues that complicate the matter.

    @Robin thanks, fixed in git master. At the last minute I figured “bamz” sounded better than “amzclient” and just changed the wrapper script name :-)

  11. abock: http://bazaar.launchpad.net/~ubuntuone-control-tower/libubuntuone/trunk/files is the code for the C widget (which shows the webkit widget and provides nice APIs to things that talk to it); http://bazaar.launchpad.net/~ubuntuone-control-tower/rhythmbox-ubuntuone-music-store/trunk/files is the code for the Rhythmbox plugin (which just basically plonks the C widget into the RB UI and handles a few signals like “play this preview”), and http://gitorious.org/banshee-community-extensions/banshee-community-extensions/trees/master/src/UbuntuOneMusicStore is the equivalent wrapper plugin for Banshee itself. All the JS stuff is in the C plugin; we do things like inject some JS that overrides the “preview” buttons in the web pages to instead throw data out via the window.status, and then trap window.status changes in the C plugin to catch that data and do something sane with it. (This would be a lot easier in a world where webkit’s AddJavaScriptInterface worked in gtk-webkit, yes it would.) Ping me for a chat at some point :)

  12. @Stuart rock on, many thanks. I’m looking forward to this side of the hack.

  13. Max Battcher says:

    Interesting. I’m curious to hear Amazon’s opinion on the integration project. If you could get their approval (or at least a “meh” from them), that would be great. I’d also be curious about the new “resume functionality” slowly getting better in the official downloader, and maybe a little bit of Amazon support on the subject. (They usually seem fairly pro-Open Source, so maybe there is a possibility of some support from them?)

  14. This is AWESOME! I’ll have to give this a try.

  15. trixtur says:

    @abock Your PC is named giggidy? That is just awesome!

  16. @Max I can’t speak too much to that right now. But more in the future.

    As for resume support, I think this is getting better. Initially when I started on this, as soon as you made a request to a resource you purchased, you could not re-request it. At this point the resources seem to expire after a few days, which means you can resume (and I will support this), but only if you do so within a certain window. Interestingly, the resources also do not expire even after they are fully delivered, so you can even re-download the purchase multiple times, as long as it’s within the window.

    @trixtur you bet it is! giggidy giggidy, giggidy goo

  17. Aw Aaron, you rock! I know I’ve been out of the development world for a while now but I keep on using Banshee & enjoying the updates. This might even be enough of a kick for me to jump back to using my own builds rather than packaged versions!

    Keep up the good work. I’m sure I’ll end up at a conference sometime in the near future — first beer is on me.

  18. You’re my hero. Getting Amazon’s downloader to work gets harder with every Ubuntu release.

    I wish you could earn pennies every time I bought music and used your downloader. Maybe build a custom browser into Banshee as well? I just hate seeing good work going unrewarded.

  19. @Michael – thanks. And, today I started working on just that. We now have a separate extension that provides an integrated Amazon MP3 storefront. Previews/samples of songs play directly in Banshee, and you can browse/search/and *buy* albums, without leaving Banshee.

    When a purchase is made, it immediately begins downloading and importing into Banshee.

    A sneak peek screencast: http://www.youtube.com/watch?v=rZjnXcfPFVo

    Relevant commits:
    1. http://git.gnome.org/browse/banshee/commit/?id=cf900630d55402aedf2745ac0ed9bc8fe8eaa006
    2. http://git.gnome.org/browse/banshee/commit/?id=c7c18facbd38811c1cb8423786db730f89bc00f1

    And next week I will write a new blog with more juicy details. And we plan on embedding a Banshee project referral tag.

  20. Jon Kulp says:

    Awesome, Aaron! I just built banshee from source and used the bamz command-line tool to get an album. Worked *perfectly*, unlike Amazon’s own downloader, which I couldn’t even get to install properly on Fedora 13. Thanks a bunch for this feature!

  21. Pingback: Amazon MP3 Store in Banshee « Aaron Bockover

  22. eroot says:

    i’d love to get this working in slackware 64bit. how would i go about doing this?

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>