summaryrefslogtreecommitdiff
path: root/plugins/mpd_client.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-03-11 02:23:31 +0100
committermathieui <mathieui@mathieui.net>2013-03-11 02:23:31 +0100
commitf11c15c0ceeddc61d712d23c86325f277691a59e (patch)
tree6be01fe7c426d682f92a4ab89b2082bb81bc7044 /plugins/mpd_client.py
parent4deee7cb0bbf8d22ca98d8c15cf7d79dfa70776b (diff)
downloadpoezio-f11c15c0ceeddc61d712d23c86325f277691a59e.tar.gz
poezio-f11c15c0ceeddc61d712d23c86325f277691a59e.tar.bz2
poezio-f11c15c0ceeddc61d712d23c86325f277691a59e.tar.xz
poezio-f11c15c0ceeddc61d712d23c86325f277691a59e.zip
Stop broadcasting a tune if we are not playing (#1840)
Diffstat (limited to 'plugins/mpd_client.py')
-rw-r--r--plugins/mpd_client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mpd_client.py b/plugins/mpd_client.py
index a7064e09..ae98b41b 100644
--- a/plugins/mpd_client.py
+++ b/plugins/mpd_client.py
@@ -38,6 +38,8 @@ class UpdateThread(threading.Thread):
self.xmpp.plugin['xep_0118'].publish_tune(artist=song.get('artist'),
length=song.get('time'), title=song.get('title'),
track=song.get('track'), block=False)
+ else if status['state'] != 'play':
+ self.xmpp.plugin['xep_0118'].stop(block=False)
self.c.disconnect()
except:
pass