From a5019465a52dbbe17c625c1c1045427c5059fe9e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 19 Sep 2009 10:49:10 +0200 Subject: Playlist: support for moving songs with drag&drop --- nephilim/mpclient.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'nephilim/mpclient.py') diff --git a/nephilim/mpclient.py b/nephilim/mpclient.py index 31b242f..9e287d7 100644 --- a/nephilim/mpclient.py +++ b/nephilim/mpclient.py @@ -295,16 +295,11 @@ class MPClient(QtCore.QObject): if self._status['state'] == 'stop' and ret: self.play(ret[0]) def move(self, source, target): - """Move the songs in playlist. Takes a list of source ids and one target position.""" - self.logger.info('Moving %d to %d.'%(source, target)) + """Move the songs in playlist. Takes one source id and one target position.""" + self.logger.info('Moving %s to %s.'%(source, target)) if not self.__check_command_ok('moveid'): return - self._client.command_list_ok_begin() - i = 0 - for id in source: - self._client.moveid(id, target + i) - i += 1 - list(self._client.command_list_end()) + self._client.moveid(source, target) #### private #### def __finish_connect(self): -- cgit v1.2.3