[Rhythmbox-devel] Dbus getSongProperties problem
- From: "Marc E." <elcomandante sbcglobal net>
- To: Rhythmbox <rhythmbox-devel gnome org>
- Subject: [Rhythmbox-devel] Dbus getSongProperties problem
- Date: Sun, 05 Feb 2006 13:25:20 -0800
I am trying to do a simple python script that displays the current
playing song. It is based on the example on the src tree.
#!/usr/bin/python
# Display information for currently playing song
import dbus
bus = dbus.SessionBus()
rbshellobj = bus.get_object('org.gnome.Rhythmbox',
'/org/gnome/Rhythmbox/Shell')
rbshell = dbus.Interface(rbshellobj, 'org.gnome.Rhythmbox.Shell')
rbplayerobj = bus.get_object('org.gnome.Rhythmbox',
'/org/gnome/Rhythmbox/Player')
rbplayer = dbus.Interface(rbplayerobj, 'org.gnome.Rhythmbox.Player')
uri = rbplayer.getPlayingUri()
props = rbshell.getSongProperties(uri)
interesting = ['title', 'artist', 'album']
for prop in props:
if prop in interesting:
print "%s: %s" % (prop, props[prop])
The problem resides in that props = rbshell.getSongProperties(uri)
blocks, it takes a (long) while to get the data.
Any ideas on what might be causing that delay?
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]