This is both 32 and 64-bit Linux compatible.
If anyone has OSX and is willing to try to get it working, it'd be awesome. Message me on Github. I'm not 100% if it's even possible though.
This extensions provides an MPRIS interface for controlling Songbird through the Linux DBUS.
This allows for changing tracks, volume and position, prev/next, play/pause/stop, as well as allows for retrieval of metadata on songs.
This supports almost all MPRIS functionality, except for:
* AddTrack method
* DelTrack method
* GetCaps method just says everything works
* CapsChange signal not implemented
* TrackListChange signal not implemented
* Metadata retrieval from external sources like Musicbrainz and Amazon
If you want them implemented, leave a comment!
This will allow query/control with anything using the MPRIS protocol.
#!/usr/bin/env python import dbus bus = dbus.SessionBus() object = bus.get_object('org.mpris.songbird', '/Player') stat = object.GetStatus() if stat == 0: print "Playing" elif stat == 1: print "Paused" else: print "Stopped" data = object.GetMetadata() print data['title'] print data['artist']
The code is up on GitHub here.
I haven't been using Songbird since they initially said they were stopping Linux support, but if you need me to bump the version of this to work with newer Linux builds, just post a comment or an issue on github.
Bumped to support 1.10.0a