From b8d1f9aafcba618851787a7f73e269395155626a Mon Sep 17 00:00:00 2001 From: Martin Wagner Date: Tue, 14 Jan 2020 20:24:28 +0100 Subject: [PATCH] fixed unintended behavior on stopped state --- bin/mpdevil.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/mpdevil.py b/bin/mpdevil.py index 198e87f..5309bf7 100644 --- a/bin/mpdevil.py +++ b/bin/mpdevil.py @@ -306,14 +306,11 @@ class TrackView(Gtk.Box): for song in songs: self.client.add(song["file"]) else: - if self.settings.get_boolean("add-album") and not force: + if self.settings.get_boolean("add-album") and not force and not self.client.status()["state"] == "stop": self.selection.handler_block(self.title_change) status=self.client.status() - try: - self.client.moveid(status["songid"], 0) #bad song index possible - self.song_to_delete=self.client.playlistinfo()[0]["file"] - except: - pass + self.client.moveid(status["songid"], 0) + self.song_to_delete=self.client.playlistinfo()[0]["file"] self.selection.handler_unblock(self.title_change) try: self.client.delete((1,)) # delete all songs, but the first. #bad song index possible