GNOME Bugzilla – Bug 561811
Jamendo plugin
Last modified: 2008-12-05 13:56:35 UTC
Hey there, attached a patch (against trunk) for a Jamendo totem plugin. This plugin allows to search, browse and listen to the large collection of creative commons licensed albums provided by jamendo. More info on jamendo: http://www.jamendo.com As a Jamendo developper, I am willing to maintain/upgrade/enhance this plugin, should I ask for a gnome svn account ? Thanks, -- David JEAN LOUIS <izimobil@gmail.com>
Created attachment 123174 [details] [review] Jamendo totem plugin patch Patch again up-to-date trunk
This looks interesting, but it uses Python 2.5 features (try...except...finally), so I won't be able to try it for a while (since I'm still on Python 2.4, and it's hell to change over). The only comment I can make at the moment is that changes to configure.in to enable compilation of the plugin seem to be missing. Looks like a formidable piece of work though!
Hey Philip, thanks for your remarks. Should I make the code python 2.4 compatible ? is it preferred ? I'll dig into the configure.in stuff and update the patch. Bye. -- David JEAN LOUIS <izimobil@gmail.com>
I couldn't make the plugin play any of the songs it found. No errors on the command-line, nothing, it just did nothing when I clicked on the play button for the tracks themselves. To be honest, I'm not certain Totem is the best interface to browse for music. Rhythmbox has great support for Jamendo, including "buying" the song. Is there any reasons we should merge this code when Rhythmbox has Jamendo support already?
>> I couldn't make the plugin play any of the songs it found. No errors on the >> command-line, nothing, it just did nothing when I clicked on the play button >> for the tracks themselves. You have to double click (activate) on the tracks or an album to play them, maybe the play icon is just confusing and should be present only on the current played song... >> To be honest, I'm not certain Totem is the best interface to browse for music. Well it is at least for me, I don't use rythmbox, I like totem simplicity. >> Is there any reasons we should merge this code when Rhythmbox has >> Jamendo support already? Do what you want with the code. I think it would be a great addition, but I won't push for it's inclusion if people doesn't find it useful :( Bye, -- David JEAN LOUIS <izimobil@gmail.com>
Created attachment 123413 [details] [review] Jamendo totem plugin patch (v2) Updated patch: * made relevant changes in configure.in and totem.spec.in * now the "play" icon is only displayed when a track is actually being played to avoid confusion
Don't use action_set_mrl_and_play(), use add_to_playlist_and_play() (which might not be exported to Python yet...) I still can't it to play anything, and the plugin is low on debug output.
(In reply to comment #7) > Don't use action_set_mrl_and_play(), use add_to_playlist_and_play() (which > might not be exported to Python yet...) AttributeError: 'totem.Object' object has no attribute 'add_to_playlist_and_play' Apparently it is not exported... What should I use then ? self.totem.action_remote(totem.REMOTE_COMMAND_REPLACE, url) ? BTW, I took the action_set_mrl_and_play() from the bbc plugin. > > I still can't it to play anything, and the plugin is low on debug output. > That's weird, it works for me on ubuntu and fedora, i'll add debug logging and will update the patch. In the meantime could you please add a "raise" statement (just before the "pass") in on_treeview_row_activated() method ?
Traceback (most recent call last):
+ Trace 210447
self.totem.action_set_mrl_and_play(url)
Against which version of Totem are developing this plugin? Those bindings were removed in 2.24.x: 2008-04-08 Philip Withnall <pwithnall@svn.gnome.org> * bindings/python/totem.defs: Remove set_mrl_* functions from the bindings, as they bypass the playlist. I've added add_to_playlist_and_play() to the Python bindings in SVN trunk. 2008-12-03 Bastien Nocera <hadess@hadess.net> * bindings/python/totem.defs: Add add_to_playlist_and_play to the bindings, add toggle-aspect and stop to the possible remote commands
(In reply to comment #9) > Traceback (most recent call last): > File "plugins/jamendo/jamendo.py", line 435, in on_treeview_row_activated > self.totem.action_set_mrl_and_play(url) > AttributeError: 'totem.Object' object has no attribute > 'action_set_mrl_and_play' > > Against which version of Totem are developing this plugin? > > Those bindings were removed in 2.24.x: > > 2008-04-08 Philip Withnall <pwithnall@svn.gnome.org> > > * bindings/python/totem.defs: Remove set_mrl_* functions from the > bindings, as they bypass the playlist. > > I've added add_to_playlist_and_play() to the Python bindings in SVN trunk. > > 2008-12-03 Bastien Nocera <hadess@hadess.net> > > * bindings/python/totem.defs: Add add_to_playlist_and_play to the > bindings, add toggle-aspect and stop to the possible remote commands > Ahh... The patch is against trunk but I'm testing against 2.24.3 (ubuntu 8.10). But ok, thanks, I'll update the patch and use add_to_playlist_and_play(). While I'm at it, do you know if there's some way to be notified of a stop event of a previously played track from the python bindings ?
You shouldn't be showing the play icon anymore, that's the job of the playlist (but you could listen to the file-opened/file-closed signals).
You made a typo in your last commit (totem.defs): s/of-object "Totem"/of-object "TotemObject"/ With this corrected add_to_playlist_and_play() now works as expected.
Fixed, thanks.
Created attachment 123963 [details] [review] Jamendo totem plugin patch (v3) * more integration with totem playlist: added a popup menu on the treeview with an "add to play list button" and an "open jamendo album page button", * optimized json fetching, * minor cosmetic changes.
Committed in trunk. Feel free to open new bugs if you have changes to make. Note that I removed the "webbrowser" dependency and used xdg-open instead. 2008-12-05 Bastien Nocera <hadess@hadess.net> * configure.in: * src/plugins/jamendo/Makefile.am: * src/plugins/jamendo/jamendo.glade: * src/plugins/jamendo/jamendo.py: * src/plugins/jamendo/jamendo.totem-plugin.in: * totem.spec.in: Patch from David JEAN LOUIS <izimobil@gmail.com> to add the Jamendo plugin (Closes: #561811)
Created attachment 124002 [details] [review] Fix for 5819/5820 Err... sorry but what you commited is not the last patch I posted, you seem to have commited the obsoleted v2 (the one with set_mrl_and_play()). Attached a patch that fix the commit errors (in revisions 5819/5820, with the xdg modification kept).
Committed, but please create new bugs in the future.