Manifest Destiny

On occasion, I’ve received requests to add support for music players besides Rhythmbox to Rhythmbox Applet. It used to be the case that the applet’s code was somewhat tied to Rhythmbox in particular, but ever since it started supporting 0.9.2+ in addition to 0.8.x — which, from the applet’s perspective, are entirely different programs anyway — it’s occured to me that there’s no technical reason why this can’t be done.

So, what other players are out there, and what would it take to add support for them to Rhythmbox Applet? Here’s a somewhat arbitrary sampling of desktop-oriented music players, and my initial impressions of how much work it would be.

Banshee has a D-Bus interface already, which is a good start. The interface doesn’t seem to provide any access to ratings, nor does it fire any signals. The latter is particularly problematic, as without them the applet would need to constantly poll Banshee to find out what its status is. The interface does provide a way to get cover art, though, which is nice, though the applet doesn’t currently support cover art (primarily since Rhythmbox doesn’t support it yet either). So, to make Banshee support viable, its D-Bus interface would need to support manipulating song ratings and to fire signals whenever something changes.

Muine also has a D-Bus interface. The interface doesn’t provide a way to rate songs, but I think that’s because Muine itself doesn’t do ratings. It does send out signals when playback is toggled and when the current song changes, though there’s no signal for when the elapsed time changes (which would eliminate the need for polling entirely). The information provided in the song-changed signal is formatted as one giant string, which is annoying, but not impossible to deal with. There’s also support for cover art. If the D-Bus interface were enhanced with an elapsed-time-changed signal, Muine support in the applet shouldn’t be a problem.

Rhythmbox, Banshee, and Muine all target the GNOME environment, and Rhythmbox Applet does as well. I have received requests for amaroK support even though it’s aimed at KDE. Unfortunately, amaroK doesn’t have any D-Bus support whatsoever, nor support for any other IPC mechanism from what I can see. Naturally, this would have to be added to amaroK, since otherwise there’s no way the applet could talk with it.

Of course, there are lots of other music players out there. If there’s a player you really want to see supported in Rhythmbox Applet, feel free to write a patch to add support for it. Fortunately, the applet’s design should make this pretty straightforward. Write a subclass of RbProxy to handle communications with the player, and then modify RbAnyProxy to use it in addition to the other proxies.

Of course, once Rhythmbox Applet starts supporting other music players, a name change will probably be in order….

Comments are closed.