GSConnect / gnome-shell-extension-gsconnect

KDE Connect implementation for GNOME

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MPRIS sharing code (interface to KDEConnect Android "Multimedia controls" plugin confuses multiple players

ferdnyc opened this issue · comments

Describe the bug

Something is very wrong with the code to export local MPRIS player controls to remote devices.

It works fine at first, but quickly becomes confused when there's more than one player to be interacted with.

For example, I used my phone to control VLC on my desktop. That worked fine, at first.

Then I switched over to playing a YouTube video in Chrome. The "Multimedia controls" plugin interface has a "Chrome" item in its dropdown list of players, and if I switch to it, local actions (play/pause, seek, etc.) are reflected on the phone's display. But if I try to send any commands from the phone, they're ignored.

The reason, apparently, is that — despite the commands being directed to "Chrome" — GSConnect is trying to deliver them to a VLC interface that no longer exists:

Apr 03 17:57:58 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/device.js:_readLoop:364]: Galaxy A53 5G: 
{
  "id": 1712181478320,
  "type": "kdeconnect.mpris.request",
  "body": {
    "player": "Chrome",
    "SetPosition": 37203924
  }
}
Apr 03 17:57:58 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/components/mpris.js:_call/<:532]: 
org.mpris.MediaPlayer2.vlc.instance1437537: Destination does not exist
_call/<@.../gsconnect@andyholmes.github.io/service/components/mpris.js:532:27
@.../gsconnect@andyholmes.github.io/service/daemon.js:720:17
Apr 03 17:57:59 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/device.js:_readLoop:364]: Galaxy A53 5G: {
  "id": 1712181479232,
  "type": "kdeconnect.mpris.request",
  "body": {
    "player": "Chrome",
    "action": "PlayPause"
  }
}
Apr 03 17:57:59 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/components/mpris.js:_call/<:532]: 
org.mpris.MediaPlayer2.vlc.instance1437537: Destination does not exist
_call/<@.../gsconnect@andyholmes.github.io/service/components/mpris.js:532:27
@.../gsconnect@andyholmes.github.io/service/daemon.js:720:17

If I try to control VLC now, it's the same problem, because the current VLC instance isn't the same one that it was originally controlling, and it doesn't appear to have noticed:

Apr 03 18:03:21 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/device.js:_readLoop:364]: Galaxy A53 5G: {
  "id": 1712181800867,
  "type": "kdeconnect.mpris.request",
  "body": {
    "player": "VLC media player",
    "action": "PlayPause"
  }
}
Apr 03 18:03:21 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/components/mpris.js:_call/<:532]: 
org.mpris.MediaPlayer2.vlc.instance1437537: Destination does not exist
_call/<@.../gsconnect@andyholmes.github.io/service/components/mpris.js:532:27
@.../gsconnect@andyholmes.github.io/service/daemon.js:720:17

Steps to reproduce

No response

Expected behavior

No response

GSConnect version

56

Installed from

GNOME Extensions website

GNOME Shell version

45.5

Linux distribution/release

Fedora 39

Paired device(s)

Samsung Galaxy A53

KDE Connect app version

1.29.0

Plugin(s)

Multimedia control

Support log

No response

Screenshots

No response

Notes

Discovered while attempting to debug #1779