Problems with the mpris2 dbus interface
  • 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()
  • Just tested the code with rhythmbox, it works fine. Guayadeque is not emitting the Seeked signal.
  • Yes guayadeque have not implemented the seeked signal.

    I will implement it soon. Never thought anyone was going to need it.
  • Please check with svn revision 1778. Signal Seeked have been added

    Thanks for your help
  • 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?
  • 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.
  • SetPosition should work now in svn revision 1784

    Thanks
  • 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
  • Sometimes?
    Can you check with revision 1786 please?
  • 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/55/media-player-indicator/

    Thanks again!!
  • I just emailed you with some info regarding MPRIS 2.2 Player Indicator which is a Gnome Shell extension using mpris 2.2.

    I was wondering if you can add support for those new mpris features, and update the set position as it no longer works with this extension?

    Best Regards,
    Craig
  • Your email is a bit confusing.
    SetPosition should work as it was fixed in 1784

    Can you try to explain better what is not working please ?
  • Well as it was explained to me, some things have changed in mrpis 2.2 so I thought perhaps that would be the issue. Anyways, SetPosition does not work with this new extension as it did with the previous, and the dev gave info as to why that is. I included that in the email, he said:


    > I just did a more in depth test. SetPosition spec has a in_signature
    > of "ox" (object_path, int64). Using
    > $ dbus-monitor destination=org.mpris.MediaPlayer2.guayadeque
    > I verified that message does have that signature. However watching the
    > output from guayadeque, I get the error
    > Could not read the Position parameter : Argument 0 is
    > specified to be of type "string", but is actually of type
    > "object_path"
    >
    >
    > It thinks it thinks it is getting "sx" (string, int64) which it is
    > not.


    The other things I notedthat dont work are:
    Playlist
    Fullscreen
    HasTrackList
    TrackList

    and I assume since playlist worked before that it is also because of mpris version. The rest of the email was the entire conversation between me and him.
  • In another part of the email, it includes a list implimented mpris features for Guayadeque. I had him check guayadeque because I was wondering if the mpris version is the same as his extension uses, and he said theres no way to tell the mpris version so instead he checked the mpris features that work with guaya.

    The things I mention above that aren't working are the features I tested with his extension which don't work, which is also confirmed by the list he gathered.
  • Is it this one? https://extensions.gnome.org/extension/54/mpris-player-control/
    That extension doesn't even work for me. Can't install it from extensions site and if I do that manually doesn't work.
    I'm using this one https://extensions.gnome.org/extension/55/media-player-indicator/
    but I liked this one more https://extensions.gnome.org/extension/30/music-integration/ but it also is not maintained any more and doesn't work.

  • Actually it is a new extension that is still being reviewed, but I'm sure it will be accepted soon enough: https://extensions.gnome.org/review/1789

    I can take a look at that one if you want to see why it isn't working, but theres another similair extension you may be more ineterested in which should work fine depending on your shell version?: https://extensions.gnome.org/extension/250/media-controls/

    Media player indicator works fine, but the new extension I'm talking about brings additional features to the table.
  • No need to bother, THX. Actually the only reason I'm using this extension is to see what is playing without switching to player. I'm using HW media controls on my laptop for the rest.
    And the one you're talking about also looks good.
  • Umm. Not to retort, but it seems I may have been wrong.

    I don't know the problem with SetPosition, but I just clicked it accidently and it seems to be working now. Maybe it isnt working for certain tracks, but it is working with that extension. Perhaps it needs looked into though.

    So the things that are still not working are:
    Playlist(used to work)
    Fullscreen
    HasTrackList
    TrackList

    and I'd be happy to just see TrackList support added, this is very useful. I'm not very worried about playlists as I don't use them, but I'm guessing it wouldnt be hard to just fix that one since it does work with other extensions.
  • Was wondering if you got a chance to look over this yet? Also wanted to clarify that I do mean TrackList and not Playlist, I know Playlist worked before, and it can be useful, but TrackList can be all the more useful.
  • Not yet. I will as soon as Im done with some changes Im working on but I will fix them all. I downloaded a software to check mpris implementation and found few problems I need to look at it also.
  • In recently svn revision 1837 it have been added support to MPRIS 2.2

    Please try it out and let me know

    Thanks for your hlep
  • Tracklist still doesn't seem to be working, but full screen is working now. I think playlist is too let me try again.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

In this Discussion