Tuesday, June 15, 2010

Rhythmbox Synclastfm plugin

Today I announce the availability of a brand new version (2.02) of my Rhythmbox plugin "Synclastfm" (see previous post).

This version packs the much anticipated "batch update" feature i.e. the plugin will walk the user's history on Last.fm in order to update Rhythmbox tracks 'playcount' field.

More information can be found here.  Have fun and don't forget to provide feedback!


  1. I seem to be getting another error in the 2.02 version:

    Traceback (most recent call last):
    File "/usr/lib/rhythmbox/plugins/synclastfm/__init__.py", line 66, in
    import agents.mb
    File "/usr/lib/rhythmbox/plugins/synclastfm/agents/mb.py", line 173, in
    File "/usr/lib/rhythmbox/plugins/synclastfm/agents/mb.py", line 100, in __init__
    File "/usr/lib/rhythmbox/plugins/synclastfm/agents/mb.py", line 44, in __init__
    dbus.service.Object.__init__(self, dbus.SessionBus(), self.PATH)
    File "/usr/lib/pymodules/python2.6/dbus/service.py", line 480, in __init__
    self.add_to_connection(conn, object_path)
    File "/usr/lib/pymodules/python2.6/dbus/service.py", line 571, in add_to_connection
    RuntimeError: To make asynchronous calls, receive signals or export objects, D-Bus connections must be attached to a main loop by passing mainloop=... to the constructor or calling dbus.set_default_main_loop(...)

    (rhythmbox:2290): Rhythmbox-WARNING **: Could not load plugin synclastfm

    (rhythmbox:2290): Rhythmbox-WARNING **: Error, impossible to activate plugin 'Last.fm Synchronization features'

  2. Bram Bonné: I just tried on my Lucid VM without any problems... strange. I am not sure how I can fix a problem I can't reproduce. Do keep me posted if you find a lead. You can use the following Wave for real-time collaboration: https://wave.google.com/wave/?pli=1#restored:wave:googlewave.com%252Fw%252BsTCHIODhA

  3. I can't manage to use your proxy over DBus for Last.fm, I have a error 403: forbidden. Do you have any idea to make it work?

  4. @Vincent: Have you configured the Last.fm plugin in Rhythmbox? That's where the proxy gets your Last.fm username from.

  5. Yes the Last.fm plugin works, as well as your Synclastfm plugin but not the proxy over DBus...

  6. @Vincent: could you run the proxy in a terminal and look at the output for additional messages that might help? Also, the 403 code might mean your username might doesn't get encoded correctly for the HTTP GET method. What's your Last.fm username?

  7. I found the problem, it is the Privacy Controls in last.fm which to allow everyone to see the recent actvity: I had choose to hide it so the proxy could not manage to find it.
    Thank you for the quick answers.

  8. Great tool ! Rhythmbox has a big problem about the conservation of those play count/rating data as it's linked to a file path (not very smart) but your tool helps to keep this data safe and restore it from last.fm

    Thanks a lot

  9. @Lionel: glad you like this tool. There is another brewing at the moment that will surely be of interest: a playlist synchronization tool! Stay tuned!

  10. Can you help me understand how everything works ?
    I let the tool work overnight on my massive music library
    (>20 000 tracks)
    I restarted it today, I would like to know how I can check the progress of it (what do those numbers mean ?).
    When (if?) it finishes, will I be able to run both proxies to manage just recently played tracks and not the whole library again ?


  11. @Lionel: Basically, on Last.fm Proxy DBus, if you see "0" in the "Tracks to update" field, that means the tool has finished pulling all the data from Last.fm and updated its database. So, the Rhythmbox plug-in can now *access* the full view.

    Now, in terms of the Rhythmbox plugin: a full database rescan occurs at regular interval (just in case there were network errors along the way that prevented the process to complete fully). This process is called "libwalk" and occurs at most once daily.

    So, within a day, you should have a fully updated RB database! (provided you were good with tagging the tags with correct ID3 tags :-)

    I'll be updating the documentation pages on http://www.systemical.com/ to reflect these info.

  12. @Bram Bonné

    I have exactly the same problem.