I am having a problem trying to connect to the "seeked" signal in the mpris2 Player dbus interface. I connected to the interface and am able to make calls such as PlayPause or Next, but I am unable to connect to the "Seeked" signal in the Player. I have the correct number of arguments, is it a problem with my code or is the seeked signal not implemented yet?
Here is the python test code I ran:
import dbus
from dbus.mainloop.glib import DBusGMainLoop
import gobject
def test(x):
.....print 'seeked'
loop = DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus(mainloop=loop)
remote_player = bus.get_object('org.mpris.MediaPlayer2.guayadeque', '/org/mpris/MediaPlayer2')
iface_player = dbus.Interface(remote_player, 'org.mpris.MediaPlayer2.Player')
iface_player.connect_to_signal("Seeked", test)
#iface_player.Next()
loop = gobject.MainLoop()
loop.run()
Problems with the mpris2 dbus interface
-
- Posts: 2
- Joined: Sun Feb 12, 2012 12:51 pm
Problems with the mpris2 dbus interface
Just tested the code with rhythmbox, it works fine. Guayadeque is not emitting the Seeked signal.
- anonbeat
- Posts: 2048
- Joined: Thu Sep 16, 2010 9:47 pm
Problems with the mpris2 dbus interface
Yes guayadeque have not implemented the seeked signal.
I will implement it soon. Never thought anyone was going to need it.
I will implement it soon. Never thought anyone was going to need it.
- anonbeat
- Posts: 2048
- Joined: Thu Sep 16, 2010 9:47 pm
Problems with the mpris2 dbus interface
Please check with svn revision 1778. Signal Seeked have been added
Thanks for your help
Thanks for your help
-
- Posts: 226
- Joined: Sun Mar 06, 2011 12:21 pm
Problems with the mpris2 dbus interface
I was thinking this was something else, and I asked a dev and he said seeked is different. So I was wondering if SetPosition is already implimented, or if it will be in the future. Will that be harder to impliment?
-
- Posts: 226
- Joined: Sun Mar 06, 2011 12:21 pm
Problems with the mpris2 dbus interface
I guess what I was talkign about it something different, I'm forwarding you an email I got from someone else explaining the issue anonbeat.
- anonbeat
- Posts: 2048
- Joined: Thu Sep 16, 2010 9:47 pm
Problems with the mpris2 dbus interface
SetPosition should work now in svn revision 1784
Thanks
Thanks
-
- Posts: 226
- Joined: Sun Mar 06, 2011 12:21 pm
Problems with the mpris2 dbus interface
Hi after testing I see it is working now. But, it still seems to not always show the correct track time, this was present before but I thought it might be because of SetPosition not working. So while you can set the position now, sometimes it will show a track is 40 minutes when it is only a few minutes long, making it harder to seek through that track. Then when you go to far it just skips to the next track.
Thanks again
Thanks again
- anonbeat
- Posts: 2048
- Joined: Thu Sep 16, 2010 9:47 pm
Problems with the mpris2 dbus interface
Sometimes?
Can you check with revision 1786 please?
Can you check with revision 1786 please?
-
- Posts: 226
- Joined: Sun Mar 06, 2011 12:21 pm
Problems with the mpris2 dbus interface
Done. Seems much much better now thanks!!! After disabling cross-fading, it lets me skip tracks faster, and fnally makes for a useful 'sound menu' in Gnome Shell. I would recommend using the Media Player Indicator extension as it is the most updated as of now. https://extensions.gnome.org/extension/ ... indicator/
Thanks again!!
Thanks again!!