summaryrefslogtreecommitdiff
path: root/nephilim/mpdsocket.py
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-04-25 10:46:24 +0200
committerAnton Khirnov <anton@khirnov.net>2013-04-25 10:46:24 +0200
commit56b63e7929bc9a2b74535107e7a9bb5f317bacc1 (patch)
treee7977841d8641f3b0006222879f0f59ac2b9b9f2 /nephilim/mpdsocket.py
parent9fbc47d89b6f696cce2d68caf4509c7d1f222bfe (diff)
mpclient: remove unused get_plist_song()
Also drop now unused synchronous command functions.
Diffstat (limited to 'nephilim/mpdsocket.py')
-rw-r--r--nephilim/mpdsocket.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/nephilim/mpdsocket.py b/nephilim/mpdsocket.py
index 685b3d8..7a8f03d 100644
--- a/nephilim/mpdsocket.py
+++ b/nephilim/mpdsocket.py
@@ -126,37 +126,6 @@ class MPDSocket(QtCore.QObject):
for arg in args[1:]:
self._sock.write((' "%s" '%self._escape(unicode(arg))).encode('utf-8'))
self._sock.write('\n')
- def write_command_sync(self, *args):
- """
- Send a command contained in args to MPD synchronously. An iterator over
- response lines is returned.
- """
- # XXX i don't really like this solution. can't it be done better?
- self._logger.debug('Synchronously executing command:' + ' '.join(map(unicode, args)))
- self._sock.blockSignals(True)
- while not self._is_idle:
- # finish all outstanding responses
- if not self._sock.canReadLine():
- self._sock.waitForReadyRead()
- self._handle_response()
-
- self._sock.write('noidle\n')
- self._sock.waitForBytesWritten()
- self._sock.waitForReadyRead()
- self._parse_discard(self._read_response())
-
- self._sock.write(args[0])
- for arg in args[1:]:
- self._sock.write((' "%s" '%self._escape(unicode(arg))).encode('utf-8'))
- self._sock.write('\n')
- self._sock.waitForBytesWritten()
-
- while not self._sock.canReadLine():
- self._sock.waitForReadyRead()
- for line in self._read_response():
- yield line
- self._idle()
- self._sock.blockSignals(False)
def state(self):
"""