After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 369754 - Display playing song information in Gaim
Display playing song information in Gaim
Status: RESOLVED DUPLICATE of bug 605023
Product: rhythmbox
Classification: Other
Component: Plugins (other)
unspecified
Other All
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-03 00:42 UTC by Tim Denholm
Modified: 2010-01-03 08:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim Denholm 2006-11-03 00:42:23 UTC
I'm one of those people that really appreciates the WMP plugin for MSN Messenger - it's nice to able to see what you and your friends are listening to.

It would be fantastic to have this feature available for Rhythmbox/Gaim as well.

The Amarok guys have already written a plugin for their player which does exactly this, available here: http://www.kde-apps.org/content/show.php?content=48025
Comment 1 James "Doc" Livingston 2006-11-08 13:09:47 UTC
The version of gaim I have (2.0b3) doesn't have the necessary DBus methods to do this. But something like the following code (in a plugin) should work:


def activate (self, shell):
	self.shell = shell
	self.pec_id = sp.connect ('playing-song-changed', self.playing_entry_changed)
	self.pc_id = sp.connect ('playing-changed', self.playing_changed)

	bus = dbus.SessionBus()
	obj = bus.get_object("net.sf.gaim.GaimService", "/net/sf/gaim/GaimObject")
	gaim = dbus.Interface(obj, "net.sf.gaim.GaimInterface")
	
	status_name = "Media"
	self.status = gaim.GaimSavedstatusFind(status_name)

	if self.status == 0:
	    current = gaim.GaimSavedstatusGetCurrent()
	    status_type = gaim.GaimSavedstatusGetType(current)
	    self.status = gaim.GaimSavedstatusNew(status_name, status_type)

	self.default = gaim.GaimSavedstatusGetCurrent()

	playing_changed(shell, shell.props.shell_player)

def deactivate (self, shell):
	set_entry (self, None)
	self.shell = None
	sp.disconnect (self.pec_id)
	sp.disconnect (self.pc_id)

def playing_changed (self, sp, playing):
	self.set_entry(sp.get_playing_entry ())

def playing_entry_changed (self, sp, entry):
	self.set_entry(entry)

def set_entry (self, entry):
	if (entry):
		db = self.shell.props.db
		artist = db.get(entry, rhythmdb.PROP_ARTIST)
		title = db.get(entry, rhythmdb.PROP_TITLE)

		message = "%s - %s" % (artist, title)
		self.gaim.GaimSavedstatusSetMessage(self.status, message)
		self.gaim.GaimSavedstatusActivate(self.status)
	else:
		self.gaim.GaimSavedstatusActivate(self.default)
Comment 2 Jonathan Matthew 2010-01-03 08:35:21 UTC
This was implemented in the IM status plugin recently.

*** This bug has been marked as a duplicate of bug 605023 ***