Monday, February 8, 2010

Last.fm Web Service desktop interface through DBus

Not too long ago, I started my quest to Music Library Faiyland (my daughter would love this quote). On this journey, I have completed a couple of intermediate steps ( Rhythmbox plugin - Syncing with Last.fm and Rhythmbox plugin for Last.fm desktop client ) and now I am happy to announce another milestone: a DBus accessible interface to Last.fm's Web Service API.

API
The current DBus interface is rudimentary but can be easily extended ( I have abstracted Last.fm's API to a manageable degree ). I will certainly be expanding the methods in the near future based on my needs and "customer feedback" ;-) Below is a non-exhaustive list of the API:

  • Account related:
    • get/set Username
    • getAuthUrl : retrieve a URL for authenticating the service against a user
    • setApiKey , setSecretKey
  • Track related
    • track.addTags
    • track.getTags
    • track.removeTag

I have only implemented these methods because they get me what I need at the moment: the possibility to "rate" my music tracks through a hack using the tags to hold the rating for a track. E.g. a 5 stars track would get "R5" as tag.

Message Based Design Technique
In this project, I have further experimented with a design technique based on "Message Passing". I have made some notes on the subject here.

Project
The home page of this project can be found on my Github repository.  A Debian package can be found on my Launchpad PPA.