diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-09-19 10:49:10 +0200 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-09-19 10:49:10 +0200 |
commit | a5019465a52dbbe17c625c1c1045427c5059fe9e (patch) | |
tree | 661759b271577b66218ec96e263b63a95cc9ed57 /nephilim/mpclient.py | |
parent | 6f1cf7b125325ec2d95986a60ee34ca127129fc8 (diff) |
Playlist: support for moving songs with drag&drop
Diffstat (limited to 'nephilim/mpclient.py')
-rw-r--r-- | nephilim/mpclient.py | 11 |
1 files changed, 3 insertions, 8 deletions
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): |