It is short after 6’o clock and it is time to provide you a first impression of my latest work. Since a few months I’ve been using Banshee to play my music. Due to some annoying glitches in Banshee (no proper gamin-integration, scrobbling is unreliable) I switched back to Rhythmbox. But I’ve missed one feature very badly: the recommendations plugin of Banshee provides you neat extra informations related to the artist you are currently listening to. But there was a way out: Rhythmbox provides simple Python bindings and so I’ve wrote my own plugin, which does the recommendations-thing for Rhythmbox. It is currently in a very early stage but works for me™. It is not time to create the 0.0.1-tarball, but it would be really cool if a few of you can test it. Just check out https://svn.usrportage.de/lastrhythm/trunk/ and copy the complete trunk-folder to
/usr/lib/rhythmbox/plugins/ and restart your Rhythmbox. It would be really helpful if you start Rhythmbox with rhythmbox -D lastrhythm to provide me a sensible output in case of crashes.
My plugin utilizes the fantastic PyScrobbler-code to access to Audiscrobbler-API. It uses the named arguments feature in Python pretty well to fire audioscrobbler-queries and is really handy to use.
Thanks to Sven Herzberg for helping me with some weird GTK-widget issues.
Hint:
If you are using Debian or Ubuntu please install python-elementtree to make things work.
Comments
Show comments linear or threaded
V answers:
published on 2007|02|09, 18:37hWhen I change the player to a new songs, Rhythmbox seems to lock up until all the info from Similar Artists is loaded. I don’t think this should happen.
Also, I’d suggest that when you click on a button, it needs to check if we have the artist or song in our library. If I click on "The Beatles" it should show all the songs I have from them… but if I click in one of his song "Love Me Do" and I have it, it should queue in the playlist.
Keep up the good work!
Lars Strojny reckons:
published on 2007|02|10, 03:03hI will implement the two features you are suggesting soon. The one thing is to make the WidgetMediater threaded and the other thing is to interact with the Rhythmbox database. The bindings for the database are – to be honest – not very intuitive so it was not just a five minute thingy. Also there is really no documentation (except of a few examples) for the Rhythmbox-API which is the worst thing you can do when you provide APIs.
rosa answers:
published on 2007|02|13, 22:45hnice one. i had the same two hints, most important – thread the whole thing and i’ll be satisfied :-)
Giovanni means:
published on 2007|02|26, 15:31hHi Lars!
your plugin is very cool!
I’m already waiting for next svn update hoping it will fix problems "AM" were talking about, an some segmentation default errors.
Furthermore, I think it should be good that, if there is no internet connection or rhythmbox plays a non-tagged/bad-tagged song, lastrhythm window could just be mimimized.
Another little enancement would be to make lastrhythm window a bit smaller, so that even with 800×600 resolution you can still surf around your rhythmbox library.
Thanks!
Giovanni
ps: I’m sure that if you ask on rhythmbox-dev mailing list about coding problems, developers will be glad (or at least, ready) to help you! :)
NiKo reckons:
published on 2007|03|06, 12:02hHey, this plugin rocks, thanks a lot.
No problem for me, it just works. Some enhancements suggestions :
– Suggestions area could be resizable – (and|or) should be vertically positionable (I got a 16:9 screen) – Configuring the number of suggestions would be great – Propose alternate links to last.fm pages (eg. Wikipedia, etc.)But anyway this is a great start, thanks for the work :)
Jack Hynes reckons:
published on 2007|04|02, 01:05hOkay I can’t seem to make this work. The error message says "Unable to activate plugin Recommendations". I’m running Ubuntu Feisty. This is the output:
Traceback (most recent call last): File "/home/jack/.gnome2/rhythmbox/plugins/lastrhythm.py", line 4, in from widgetmediator import WidgetMediator File "/home/jack/.gnome2/rhythmbox/plugins/widgetmediator.py", line 2, in import pyscrobbler File "/home/jack/.gnome2/rhythmbox/plugins/pyscrobbler/__init__.py", line 1, in from audioscrobbler import * File "/home/jack/.gnome2/rhythmbox/plugins/pyscrobbler/audioscrobbler.py", line 273, in from elementtree.ElementTree import ElementTree
ImportError: No module named elementtree.ElementTree
(rhythmbox:28496): Rhythmbox-WARNING **: Could not load plugin lastrhythm
(rhythmbox:28496): Rhythmbox-WARNING **: Error, impossible to activate plugin ‘Recommendations’
Lars Strojny replies:
published on 2007|04|10, 18:12hSorry for the late response, but you need to install python-elementtree before (as mentioned in the article above).
Thomas Ficca states:
published on 2008|02|14, 19:02hIs your plugin still available? My noobness is showing because I’m having difficulty downloading it. I’ve tried navigating there with my browser and a GUI svn client with no luck. Thanks for your help
Lars Strojny supposes:
published on 2008|02|14, 19:18hYes, it is. Try:
Thomas Ficca returns:
published on 2008|02|14, 21:44hgot it, I’m not very familiar with SVN, or the client I was using. I was trying to add the entire repository instead of just "checking out" the /trunk folder. I let ya know how it works!
medeshago says:
published on 2008|02|25, 17:32hI’m on Ubuntu and I have python elementtree installed and it stills complains about it:
File "/usr/lib/rhythmbox/plugins/trunk/pyscrobbler/audioscrobbler.py", line 273, in from elementtree.python import ElementTree ImportError: No module named elementtree.pythonNari responses:
published on 2008|02|27, 14:35hTo solve this issue under Ubuntu, you need to change line 273 in file audioscrobbler.py:
from elementtree.ElementTree import ElementTree
to
from xml.etree.ElementTree import ElementTree
Hadret returns:
published on 2008|05|22, 23:51hThat did the trick and plugin launches but doesn’t work: http://debian.pastebin.com/m4e32e118
Distro is Debian Sid :o
Lars Strojny reckons:
published on 2008|05|26, 23:16hInteresting. Could you try hacking the code and add some debug statements in $pluginpath/image/fetchergnomevfs.py. Printing self.url would be the first step.
Lars Strojny reckons:
published on 2008|05|26, 23:12hThis should be fixed in SVN now.
sander replies:
published on 2008|05|25, 16:02hThe fact that you refered to "/usr/lib/gnome2/rhythmbox" saved my life. It was really frustrating for me not to be able to get the (few) plugins available to work, as creating a "./gnome2/rhythmbox/plugins" didn’t help a lot. Thanks!
Luca Invernizzi means:
published on 2009|04|30, 20:56hIt works awesomely. You can just put trunk/* into ~/.local/share/rhythmbox/plugins (plugin local to the user).
Btw, recently I wrote a little script to import last.fm play counts in rhythmbox. You might want to check it out: http://allievi.sssup.it/techblog/
spartan2276 returns:
published on 2009|05|09, 22:40hThis worked for me just fine all I did was copy the entire trunk directory into /home//.gnome2/rhythmbox/plugins.
I’m running Ubuntu 9.04. so I’m don’t think the rhythmbox dir exists under .gnome2 if not just create it. Also make sure you create the plugins dir as well.
Remember don’t forget to install python-elementtree via terminal or synaptic Package manager (system>Administration>Synaptic synaptic Package manager. do a search for
python-elementtree and mark for install and done, restart or start rhythmbox go to edit>plugins and enable the recommendations plugin.
xvi82 states:
published on 2009|07|12, 01:17hThe plugin worked fine with Rhythmbox 12.2 but now doesn’t work with the Rhythmbox 12.3 update. I’ve installed the .deb from getdeb, but I thing that the internal changes of the Rhythmbox update have affected the plugin.
Until the plugin doesn’t work with the new v12.3 I will use the last update 12.2.
I love this plugin (sorry for my english, I’m from spain)
Lars Strojny responses:
published on 2009|07|12, 11:57hI’m sorry, I do no longer use Rhythmxbox, so I won’t fix the plugin. Maybe somebody else will overtake it?
Add comment