Bug 400887 - Dbus 'PlaybackStatus' always returns 'stopped', play/pause still works with commands (no Plasma)
Summary: Dbus 'PlaybackStatus' always returns 'stopped', play/pause still works with c...
Status: RESOLVED FIXED
Alias: None
Product: plasma-browser-integration
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-09 20:53 UTC by zjeffer
Modified: 2018-11-10 15:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zjeffer 2018-11-09 20:53:41 UTC
I stopped using KDE/Plasma and I'm using bspwm instead. I'd like to use dbus to get the property for 'PlaybackStatus', but the property always returns 'Stopped' instead of 'Playing' or 'Paused'.

I believe everything worked until about a week ago, because I could still use a polybar module (this one: https://github.com/x70b1/polybar-scripts/tree/master/polybar-scripts/player-mpris-tail) to click play/pause/next/prev in my top bar, but I'm pretty sure that module needs that 'PlaybackStatus' property, because it doesn't show any title/buttons.

I can still activate the play/pause/next/prev/.. methods so that means the browser integration still works, but not the playbackstatus property.
Comment 1 Kai Uwe Broulik 2018-11-09 20:59:13 UTC
Can't reproduce:

$ dbus-send --dest=org.mpris.MediaPlayer2.plasma-browser-integration --print-reply /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:org.mpris.MediaPlayer2.Player string:PlaybackStatus
method return time=1541797119.489509 sender=:1.57 -> destination=:1.254 serial=1355 reply_serial=2
   variant       string "Playing"
Comment 2 zjeffer 2018-11-09 21:07:56 UTC
I should mention: it still works in KDE, just not in bspwm. It used to work in bspwm as well, though, which is why I think this might be plasma-browser-integration's 'fault'.
Comment 3 zjeffer 2018-11-10 13:54:52 UTC
I found why it doesn't work anymore: recently I added 

'export XDG_CURRENT_DESKTOP=KDE' 
and 
'export QT_QPA_PLATFORMTHEME="qt5ct"' 

to my .xinitrc to make dolphin work as it should without KDE. 
The problem is that with these commands, the 'org.mpris.MediaPlayer2.plasma-browser-integration' service doesn't load, only the 'org.kde.plasma.browser_integration' service loads. I need the first service to get it to work as it should.

Does anyone know how I can use those environment variables to get dolphin to work, and still get the 'org.mpris.MediaPlayer2.plasma-browser-integration' service loaded? Thanks.
Comment 4 zjeffer 2018-11-10 15:29:46 UTC
I found that only using the first export command can get both dolphin to work properly and that service to load.

There is still one problem: when opening dolphin from another program, like firefox when opening the download folder, dolphin still has no icons, but that's another issue. Closing.