Friday, February 19, 2010
what are you listening?
I think the plugin that most people may use according to how many mails I get with that subject is the "current song" plugin.
So to start polishing the plugin system on emesene 2 I decided to implement the "music" plugin, that is like "current song" but on emesene 2.
you can see the code here:
http://github.com/marianoguerra/emesene/tree/master/mesinyer/plugins/music/
basically you have to create a file called handler_<your music player name here>.py and copy the content of handler_mpd.py replacing the body of the functions for the code required to do those actions on your preferred music player, after you finished that, change the last line:
songretriever.register('mpd', Handler())
by changing 'mpd' for the name of your player and then add a line at the bottom of the songretriever.py file to import your module.
and that's all!
please if you want to contribute a handler for this plugin use pylint on the file before sending it to me, code quality is one of the goals on emesene 2 :)
Subscribe to:
Post Comments (Atom)
11 comments:
Really nice!
And dude, you listen to Anathema!
That's so cool!
One player I'd like to have support out-of-the-box is gmusicbrowser. I always have to redownload the plugin and edit the configuration files everytime I upgrade emesene.
@Satoshi:I saw anathema at buenos aires, it was awesome!
about the player, if you have a link to the code I will try to add it
yeah i'd use it if it actually worked with foo_wlm. but it doesn't. foo_wlm works well with WLM.
Here is a link, hope that helps.
http://gmusicbrowser.org/dokuwiki/doku.php?id=third_party_apps:emesene
It does have a problem in that it will keep showing the song even if you pause it, but I kinda got used to it.
@satoshi, I added the support but didnt tested it, if you can give it a try.
to test it you will have to change the line 11 from mpd to gmusicbrowser on plugins/music/plugin.py
I will add a preference dialog later.
Nice but this plugin work on Windows too or just with a Linux OS ??
@titi53: it will work on windows, but there is no handler for a windows music player yet.
It worked perfectly!
Thanks a lot!
Since I use Gentoo, maybe I'll even make a new ebuild for it (I already wrote one for 1.6, since it isn't as of yet in Gentoo default overlay).
But I'm not sure how to deal with the fact that it's SVN.
@Satoshi, emesene2 is on git
A "feature request": It would be nice to show the ordinary status quote if no music is currently playing, instead of just putting "No media is playing" or like. Or at least to haver the option to do so :)
Thanks!
Post a Comment