From f11c15c0ceeddc61d712d23c86325f277691a59e Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 11 Mar 2013 02:23:31 +0100 Subject: Stop broadcasting a tune if we are not playing (#1840) --- plugins/mpd_client.py | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3