Last.fm for Rhythmbox – New Style

Just like a lot of other users I like to scrobble my played tracks to last.fm. Unfortunately Rhythmbox provides no way to love a track. The last.fm plug-ins for Windows and OS X have been modified to scrobble through the last.fm client some time ago but the Rhythmbox plug-in still submits directly. That is until now…

Rhythmbox and lastfm

I have written a new last.fm plug-in for Rhythmbox today. Instead of scrobbling directly like the old one, it submits tracks via the lastfm client application. The client displays additional information about the currently playing song and you can love and tag the song with it.

The source code is available as a patch against Rhythmbox 0.12.6: scrobbler-v3l.patch
You can apply this patch with:

patch -NEp1 < ~/scrobbler-v3l.patch

Ubuntu Karmic Koala users can get precompiled packages from my APT repositories. Add

deb http://blog.blackdown.de/static/debian/rhythmbox/ karmic main
deb-src http://blog.blackdown.de/static/debian/rhythmbox/ karmic main

to /etc/apt/sources.list. (Jaunty users replace karmic with jaunty in these two lines to get rhythmbox-0.12.0 with my plug-in)
Then install or upgrade rhythmbox:

$ aptitude update
$ aptitude install rhythmbox

The repository is signed with my GPG key. The key can be imported into your apt keyring with

wget http://blog.blackdown.de/static/gpg.asc -O - | \
    sudo apt-key add -

To enable the new plug-in go to Edit » Plugins. Disable the “Last.fm” plug-in and enable the “New Style Last.fm Scrobbler”.
If you enable this scrobbler plug-in, you have to disable the old Last.fm plug-in! Otherwise you will have two plug-ins which will both submit to last.fm at the same time. Only use one at a time!

Note that this first version of the plug-in does not start the lastfm client automatically! It will scrobble only if you start the client manually. I will fix this in the next version.

Feedback, postive as well as negative, is very welcome. If you want to report a bug, please include the output of “rhythmbox -D rb-scrobbler-plugin” and the tags of the song you wanted to scrobble.
If you want to report a crash, providing a gdb backtrace would be nice.

You might also want to take a look at this thread on the last.fm development forum.

May 20th, 2007: v2 of the plug-in is available now. lastfm gets launched automatically now.
May 22nd, 2007: v3 is available. The patch and the Ubuntu package have been updated: Changes since v2
May 25th, 2007: v3a: Updated patch and deb for the new Ubuntu Gutsy version of Rhythmbox.
May 29th, 2007: v3b: Updated patch and deb for the new Rhythmbox release.
May 31st, 2007: Updated patch Ubuntu package.
June 1st, 2007: Added APT repositories for Ubuntu Feisty and Gutsy.
June 28th, 2007: v3c: Updated patch and debs for the new Rhythmbox release.
August 16th, 2007: v3d: Updated patch and debs for Rhythmbox 0.11.2.
November 14th, 2007: v3e: Updated patch and debs for Rhythmbox 0.11.3. Add Hardy repository.
November 30th, 2007:Updated gusty and hardy builds. Include fixed Croatian po file from Franko Burolo.
February 7th, 2008: v3f: Updated patch and debs for Rhythmbox 0.11.4. (Thanks to Iain Buchanan for notifying me of the missing patch!)
May 31st, 2008: v3g: Updated patch to apply cleanly to Rhythmbox 0.11.5. (The debs for hardy have been at 0.11.5 for quite a while).
October 15st, 2008: v3h: Updated patch to apply cleanly to Rhythmbox 0.11.6. Ubuntu packages are available for i386, amd64, and lpia now.
October 20st, 2008: v3i: Updated patch to apply cleanly to the real Rhythmbox 0.11.6 release. v3h was for a later version from SVN.
April 24th, 2009 v3j: Update patch to apply cleanly to Rhythmbox 0.12.0. Provide debs for Ubuntu Jaunty.
November 4th, 2009 v3k: Update patch to apply cleanly to Rhythmbox 0.12.5 and provide debs for Ubuntu Karmic.
November 29th, 2009 v3l: Update patch to apply cleanly to Rhythmbox 0.12.6 and provide debs for Ubuntu Lucid too.

Tags: , , ,

133 Responses to “Last.fm for Rhythmbox – New Style”

  1. Hadret says:

    I’m getting some errors when I’m trying to patch Rhythmbox source, here’s how it looks like:

    patching file configure
    Hunk #1 FAILED at 20560.
    Hunk #2 succeeded at 22608 (offset 1190 lines).
    1 out of 2 hunks FAILED — saving rejects to file configure.rej
    patching file configure.ac
    Hunk #1 succeeded at 1053 (offset 126 lines).
    patching file plugins/Makefile.am
    Hunk #1 succeeded at 9 (offset -1 lines).
    patching file plugins/Makefile.in
    Hunk #2 FAILED at 117.
    1 out of 2 hunks FAILED — saving rejects to file plugins/Makefile.in.rej
    patching file plugins/scrobbler/Makefile.am
    patching file plugins/scrobbler/Makefile.in
    patching file plugins/scrobbler/rb-scrobbler-plugin.c
    patching file plugins/scrobbler/scrobbler.rb-plugin.desktop.in

    • ozhoo says:

      I applied this to the latest rhythmbox (0.12.3) via git. Same chunks failed but if you check out where they fail in each .rej you see it’s easy to add manually. I didn’t create a new patch with my diffs because I expect any patch will break frequently if you want the latest rb from git.

      ps!

      I use ubuntu karmic, and I had to add “-Wno-format-security” to CFLAGS in plugins/scrobbler/Makefile so it would ignore the string warnings being treated as errors and bombing

      Happy patching

  2. Hadret, please try rhythmbox_0.11.6svn20081008.orig.tar.gz. There might have been some changes in SVN that break the patch for the original 0.6.11 release.

  3. Hadret says:

    Obviously there were, that’s too bad this plugin is incompatible with standard Rhythmbox and support only Ubuntu SVN version :/

  4. Good point, here’s an updated patch: scrobbler-v3i.patch

  5. Hadret says:

    It’s alive! Thank You very much! (:

  6. [...] …dla Rhythmboksa. Pojawiła się nowa wersja wspierająca Rhythmboksa 0.11.6. We wpisie, w którym ów wtyczkę opisywałem, wkrótce powinna pojawić się uaktualniona informacja oraz paczka z nową wersją dla Debiana Testing/Sid x86_64 (: « Debian Grass [...]

  7. Neomoha says:

    Hi Jürgen,
    Thank you very much for this patch.
    Today Ubuntu Desktop Team has just released

    Rhythmbox 0.11.6svn20081008-0ubuntu4.2

    Which, obviously, if you update, you loose the Lastfm for Rhythmbox – New Style configuration.
    It will be great if you could patch this new version.
    Thanks again.

  8. Neomoha, I’ll release an update later today.
    You can tell apt to only upgrade rhythmbox if there’s a new version in my repository. Add the following to /etc/apt/preferences:

    Package: rhythmbox
    Pin: release l=jkreileder
    Pin-Priority: 999
  9. A new version for Intrepid (and Hardy too) is available now.

  10. Mark says:

    Thanks for this great plugin!

  11. sp says:

    Awesome plugin, thanks a lot for this.

  12. lao says:

    very helpful modification, thanks a lot! :)

    but i’ve got a lil question concerning the ipod-support. may it be, that the binary .deb isn’t compiled with the –enable-ipod-writing and –enable-track-tansfer options?! cause my rb crashes, if i try to drag&drop music to my ipod nano 2g…

    • Actually both options are enabled just like in the standard Ubuntu package. And the plug-in doesn’t touch anything in that area, so the iPod problem you are seeing was most likely inherited from the Ubuntu package.

  13. lee says:

    awesome! I had to make a few edits to configure/makefiles but after that it worked fine on a recent SVN checkout.

    They should really include this with the main release.

    Thanks!

  14. Kathy says:

    In case anyone else starts having the same issue I’m having:

    With this plugin installed, every time the last.fm client is open Rhythmbox won’t play songs. It appears to but stays at 0:00. If I close last.fm then it plays normally.

    The problem is apparently pulseaudio running multiple instances, so restart it with

    /etc/init.d/pulseaudio restart

  15. [...] …dla Rhythmboksa. Przepis na instalację w najnowszej wersji Rhythmboksa jak i paczka dla Debiana Testing/Sid x86_64 do znalezienia w zaktualizowanej wersji wpisu Rhythmbox + Last.fm + Debian (: [...]

  16. dodo says:

    awwwwww thanks a lot <3

    I was searching for weeks for something like that

  17. Jose Torres says:

    Thanks so much for this man. I love it!

  18. Robin says:

    I love you man, you are the awesomest.

  19. Amaury says:

    Awesome plugin! Now my friends can see me “playing now”.
    However, my profile shows that I’m playing with Windows Media Player

    “Ouvindo agora com Windows Media Player + Scrobbler da Last.fm”, that in English means:
    “Listening now with Windows Media Player + Scrobbler from Last.fm”.

    Any ideas why it’s happening?

    Ps. Sorry for the very bad english

  20. [...] la procedura è minuziosamente descritta nel suo blog che potete trovare qui. Il plugin si chiama New Style Last.FM Scrobbler. Quella che segue è una versione breve che ho [...]

  21. devl0r says:

    can’t find file to patch at input line 29
    Perhaps you used the wrong -p or –strip option?

    wut?

  22. re404 says:

    awesome!
    works!
    //R

  23. [...] As I found out today, trying to fix the „Now playing“ information of rhythmbox, there is a patch. It provides a new last.fm plugin that uses the official last.fm client including [...]

  24. derchmul says:

    Thanks a lot for the patch! I installed the precompiled version of your repository and it worked out of the box. (just half a minute without music :-) )

  25. says:

    awesome plug-in.

    Congratulations! Works the same.

  26. steve says:

    Is there a .de packeage that can deal with all this, because i’m still a bit unsavvy and can’t understand what to do.

    Alternatively, any links that would explain to me what’s going on?

Leave a Reply

Note: Comments are moderated, so your reply will not appear instantly.