From dc64ada5b20dee3a992956b7c01a3f5e5ca1acb8 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sat, 1 May 2021 23:09:59 +0100 Subject: [PATCH] BUG: Actually stop delayed tracklist start if stopped early. --- player.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/player.py b/player.py index 06918be..555db09 100644 --- a/player.py +++ b/player.py @@ -522,6 +522,11 @@ class Player: # This essentially allows the tracklist end API call to happen in a separate thread, to avoid hanging playout/loading. def _potentially_end_tracklist(self): + if self.tracklist_start_timer: + self.logger.log.info("A tracklist start timer was running, cancelling.") + self.tracklist_start_timer.cancel() + self.tracklist_start_timer = None + # Make a copy of the tracklist_id, it will get reset as we load the next item. tracklist_id = self.state.get()["tracklist_id"] if not tracklist_id: