eonpatapon / mpDris2

MPRIS V2.1 support for mpd
GNU General Public License v3.0
212 stars 46 forks source link

GNOME Shell lock screen notifications don't get updated #104

Open smcv opened 6 years ago

smcv commented 6 years ago

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

vroetman commented 4 years ago

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.