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 754444 - Dbus-plugin does not work right.
Dbus-plugin does not work right.
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Plugins
3.16.x
Other Linux
: Normal blocker
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-09-02 10:30 UTC by moma
Modified: 2015-09-08 10:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dbusservice: Fix use of TotemObject plugin API (5.43 KB, patch)
2015-09-08 08:52 UTC, Philip Withnall
committed Details | Review

Description moma 2015-09-02 10:30:11 UTC
Totem's DBus-plugin may have a bug.  I've tried to control the Totem-player from Audio-Recorder.  Audio-recorder does see the player on the DBus but Totem does not reply correctly to requests.

This same bug was reported last year too. And year before. Now the bug is back.

I run totem 3.16.2 on Ubuntu 15.10 (alfa).
$ totem --version
totem 3.16.2
--------

Totem fails to return "PlaybackStatus". (this is a long one-line command):

$  dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.totem /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'


Error org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  • File "/usr/lib/python3/dist-packages/dbus/service.py", line 707 in _message_cb
    retval = candidate_method(self, *args, **keywords)
  • File "/usr/lib/totem/plugins/dbus/dbusservice.py", line 164 in Get
    return self.GetAll (interface_name)[property_name]
  • File "/usr/lib/totem/plugins/dbus/dbusservice.py", line 182 in GetAll
    if self.totem.action_remote_get_setting (
AttributeError: 'Object' object has no attribute 'action_remote_get_setting'
----------------------

Totem fails to return "Metadata". (this is a long one-line command):

$ dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'


dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.totem /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'
Error org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  • File "/usr/lib/python3/dist-packages/dbus/service.py", line 707 in _message_cb
    retval = candidate_method(self, *args, **keywords)
  • File "/usr/lib/totem/plugins/dbus/dbusservice.py", line 164 in Get
    return self.GetAll (interface_name)[property_name]
  • File "/usr/lib/totem/plugins/dbus/dbusservice.py", line 182 in GetAll
    if self.totem.action_remote_get_setting (
AttributeError: 'Object' object has no attribute 'action_remote_get_setting'
----------------------------------

Here are correct replies from the RhythmBox player:

Get Playerstatus from RhythmBox:
$ dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'

Get Metadata from RhythmBox:
dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'
method return time=1441188372.041001 sender=:1.146 -> destination=:1.149 serial=194 reply_serial=2
   variant       string "Playing"

   variant       array [
         dict entry(
            string "mpris:trackid"
            variant                string "/org/mpris/MediaPlayer2/Track/2"
         )
         dict entry(
            string "xesam:url"
            variant                string "http://ubuntu.hbr1.com:19800/tronic.ogg"
         )
         dict entry(
            string "xesam:title"
            variant                string "After Midnight Dejavu (2006)"
         )
         dict entry(
            string "xesam:genre"
            variant                array [
                  string "House"
               ]
...
...
...
]
--------------------

BTW: I can see in the Audio-recorder (when debugging) that Totems sends some DBus-messages repeatedly. Audio-recorder gets mad by receiving 20 STOP, START, PAUSE, START, STOP, PAUSE, STOP... messages.  I programmed a special workaround for Totem in Audio-Recorder.

Ref: 
http://bazaar.launchpad.net/~audio-recorder/audio-recorder/trunk/view/head:/src/dbus-mpris2.c

https://launchpad.net/~audio-recorder
Comment 1 Philip Withnall 2015-09-08 08:52:17 UTC
Created attachment 310876 [details] [review]
dbusservice: Fix use of TotemObject plugin API

With commit 4fee5dcc803bcb6ed3bef168924003fe75cc358b, a lot of plugin
API was renamed to remove ‘action_’ prefixes. Catch up with that.
Comment 2 Bastien Nocera 2015-09-08 09:13:11 UTC
Review of attachment 310876 [details] [review]:

Yes, thanks.
Comment 3 Philip Withnall 2015-09-08 10:26:24 UTC
Attachment 310876 [details] pushed as 995b34f - dbusservice: Fix use of TotemObject plugin API