[Pkg-mpd-commits] [python-mpd] 46/262: adding idle and noidle commands

Simon McVittie smcv at debian.org
Sun May 22 18:16:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch upstream
in repository python-mpd.

commit 2e4bfd25dda52f96563e54d57197dde00e977c26
Author: J. Alexander Treuman <jat at spatialrift.net>
Date:   Mon Jun 1 18:16:54 2009 -0400

    adding idle and noidle commands
    
    Note that these commands aren't very usable in their current form.  idle()
    blocks while waiting for events, and will thus hang if none are received.
    Calling noidle() from another thread will cause idle() to return, but
    python-mpd isn't considered re-entrant, so sharing instances between
    threads isn't recommended.
---
 doc/commands.txt | 2 ++
 mpd.py           | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/doc/commands.txt b/doc/commands.txt
index df8058a..85a8589 100644
--- a/doc/commands.txt
+++ b/doc/commands.txt
@@ -1,6 +1,8 @@
 == Status Commands
 clearerror                         -> getnone
 currentsong                        -> getobject
+idle             <str>             -> getlist
+noidle                             -> None
 status                             -> getobject
 stats                              -> getobject
 
diff --git a/mpd.py b/mpd.py
index 3a5d867..ade41a6 100644
--- a/mpd.py
+++ b/mpd.py
@@ -54,6 +54,8 @@ class MPDClient(object):
             # Status Commands
             "clearerror":       self._getnone,
             "currentsong":      self._getobject,
+            "idle":             self._getlist,
+            "noidle":           None,
             "status":           self._getobject,
             "stats":            self._getobject,
             # Playback Option Commands

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git



More information about the Pkg-mpd-commits mailing list