Skip to content

Instantly share code, notes, and snippets.

@ikelos
Created October 12, 2013 16:58
Show Gist options
  • Save ikelos/6952321 to your computer and use it in GitHub Desktop.
Save ikelos/6952321 to your computer and use it in GitHub Desktop.
diff --git a/src/mpDris2.in b/src/mpDris2.in
index 74878bd..535eeea 100755
--- a/src/mpDris2.in
+++ b/src/mpDris2.in
@@ -414,6 +414,7 @@ class MPDWrapper(mpd.MPDClient):
def mediakey_callback(self, appname, key):
""" GNOME media key handler """
logger.debug('Got GNOME mmkey "%s" for "%s"' % (key, appname))
+ self.idle_leave()
if key == 'Play':
if self._status['state'] == 'play':
notification.rnotify(identity, _('Paused'))
@@ -428,6 +429,7 @@ class MPDWrapper(mpd.MPDClient):
elif key == 'Stop':
notification.rnotify(identity, _('Stopped'))
self.stop()
+ self.idle_enter()
def last_currentsong(self):
return self._currentsong.copy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment