summaryrefslogtreecommitdiff
path: root/nephilim/mpdsocket.py
diff options
context:
space:
mode:
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):
"""