made "enqueue" mode more consistent

This commit is contained in:
Martin Wagner 2021-10-20 22:48:38 +02:00
parent 0d027d375d
commit 517ad519ad

View File

@ -705,7 +705,8 @@ class Client(MPDClient):
def enqueue(files): def enqueue(files):
status=self.status() status=self.status()
if status["state"] == "stop": if status["state"] == "stop":
play(files) self.clear()
append(files)
else: else:
self.moveid(status["songid"], 0) self.moveid(status["songid"], 0)
current_song_file=self.currentsong()["file"] current_song_file=self.currentsong()["file"]
@ -766,7 +767,6 @@ class Client(MPDClient):
if status["state"] == "stop": if status["state"] == "stop":
self.clear() self.clear()
append() append()
self.play()
else: else:
self.moveid(status["songid"], 0) self.moveid(status["songid"], 0)
current_song_file=self.currentsong()["file"] current_song_file=self.currentsong()["file"]