prevent traceback when player is no more on dbus. fixes #4131
This commit is contained in:
parent
64b73530c4
commit
69b088b4b9
|
@ -217,7 +217,10 @@ class MusicTrackListener(gobject.GObject):
|
||||||
bus.get_object('org.gnome.Rhythmbox',
|
bus.get_object('org.gnome.Rhythmbox',
|
||||||
'/org/gnome/Rhythmbox/Player'), 'org.gnome.Rhythmbox.Player')
|
'/org/gnome/Rhythmbox/Player'), 'org.gnome.Rhythmbox.Player')
|
||||||
rbshell = dbus.Interface(rbshellobj, 'org.gnome.Rhythmbox.Shell')
|
rbshell = dbus.Interface(rbshellobj, 'org.gnome.Rhythmbox.Shell')
|
||||||
|
try:
|
||||||
uri = player.getPlayingUri()
|
uri = player.getPlayingUri()
|
||||||
|
except dbus.DBusException:
|
||||||
|
uri = None
|
||||||
if not uri:
|
if not uri:
|
||||||
return None
|
return None
|
||||||
props = rbshell.getSongProperties(uri)
|
props = rbshell.getSongProperties(uri)
|
||||||
|
|
Loading…
Reference in New Issue