From 56b63e7929bc9a2b74535107e7a9bb5f317bacc1 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 25 Apr 2013 10:46:24 +0200 Subject: mpclient: remove unused get_plist_song() Also drop now unused synchronous command functions. --- nephilim/mpclient.py | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'nephilim/mpclient.py') diff --git a/nephilim/mpclient.py b/nephilim/mpclient.py index 2a454c5..f3fc24a 100644 --- a/nephilim/mpclient.py +++ b/nephilim/mpclient.py @@ -206,11 +206,6 @@ class MPClient(QtCore.QObject): iterator over Songs in current playlist as the argument. """ self._command('playlistinfo', callback = lambda data: callback(self._parse_songs(data))) - def get_plist_song(self, plid): - """ - Get a song with a given playlist id synchronously. - """ - return self._command_sync('playlistid', plid, parse = lambda data: Song(list(self._parse_objects(data, []))[0])) def delete(self, ids): """ Delete songs with specified ids from playlist. @@ -593,21 +588,6 @@ class MPClient(QtCore.QObject): kwargs['callback']([]) else: self._socket.write_command(*cmd, **kwargs) - def _command_sync(self, *cmd, **kwargs): - """ - Send specified command to MPD synchronously. kwargs must contain - a callable 'parse' used for parsing the reponse. - """ - parse = kwargs['parse'] - - if not self.is_connected(): - self._logger.debug('Not connected -- not running command: %s'%cmd[0]) - return parse([]) - elif not cmd[0] in self._commands: - self._logger.error('Command %s not allowed.'%cmd[0]) - return parse([]) - else: - return parse(self._socket.write_command_sync(*cmd)) def _set_output(self, out_id, val): """ -- cgit v1.2.3