mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
reduced the use of "playlistinfo"
This commit is contained in:
parent
0584f007fd
commit
1d74f466a4
@ -663,14 +663,14 @@ class Client(MPDClient):
|
||||
play(files)
|
||||
else:
|
||||
self.moveid(status["songid"], 0)
|
||||
current_song_file=self.playlistinfo()[0]["file"]
|
||||
current_song_file=self.currentsong()["file"]
|
||||
try:
|
||||
self.delete((1,)) # delete all songs, but the first. bad song index possible
|
||||
except MPDBase.CommandError:
|
||||
pass
|
||||
for f in files:
|
||||
if f == current_song_file:
|
||||
self.move(0, (len(self.playlistinfo())-1))
|
||||
self.move(0, (int(self.status()["playlistlength"])-1))
|
||||
else:
|
||||
self.add(f)
|
||||
if mode == "append":
|
||||
|
Loading…
Reference in New Issue
Block a user