From 97d1e5be46b9724b29a5a43f0eeeee18b15c9658 Mon Sep 17 00:00:00 2001 From: luzip665 Date: Sun, 12 May 2024 09:48:32 +0200 Subject: [PATCH] Don't remove tracks that are not in list Fixes #919 --- xl/player/queue.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xl/player/queue.py b/xl/player/queue.py index c3b708d28..297a59050 100644 --- a/xl/player/queue.py +++ b/xl/player/queue.py @@ -134,6 +134,9 @@ def get_next(self): track = self._calculate_next_track() if track is not None: return track + if self.__remove_item_after_playback and len(self) == 1: + #pop the last track + self.pop(0) if self.current_playlist is not self: return self.current_playlist.get_next() elif self.last_playlist is not None: