From 9769d1b7d0cf0442ca8feb3c201ec3a5e2d6d122 Mon Sep 17 00:00:00 2001 From: ncoop Date: Sat, 6 Aug 2016 14:32:36 -0700 Subject: [PATCH] stop method sends stop command to mpd via socket. --- i3pystatus/mpd.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/i3pystatus/mpd.py b/i3pystatus/mpd.py index 64e6225..f0b94d6 100644 --- a/i3pystatus/mpd.py +++ b/i3pystatus/mpd.py @@ -149,6 +149,12 @@ class MPD(IntervalModule): except Exception as e: pass + def stop(self): + try: + self._mpd_command(self.s, "stop") + except Exception as e: + pass + def next_song(self): try: self._mpd_command(self.s, "next")