eonpatapon / mpDris2

MPRIS V2.1 support for mpd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GNOME Shell lock screen notifications don't get updated

smcv opened this issue · comments

I have configured GNOME Shell to display mpDris2's notifications with full content, even in the lock screen: this lets me use a locked laptop as a music player by combining the media player hotkeys with lock screen notifications.

In the normal GNOME Shell view, notifications work fine. However, while in the lock screen, only the first notification to be displayed is effective. Subsequent mpDris2 events do not replace the original notification bubble, so the lock screen will display "Now playing: [track 1]" even when I've actually reached track 10.

Workaround:

             try:
+                self._notification.close()
                 self._notification.update(title, body, uri)
                 self._notification.show()
             except Exception as e:
                 logger.warning('Failed to update notification: %s' % e)

I'm not proposing a PR with that change because I suspect this should really be treated as a GNOME Shell bug - I'm just opening this issue so that it's visible as a known issue. I've also raised it on the GNOME Shell issue tracker: https://gitlab.gnome.org/GNOME/gnome-shell/issues/85

Thanks for this. It seems either gnome is not fixed yet, or the fixes have not made it into Fedora 31. This workaround works great for me.