From 5491f00c34186e93759d7449bd61a860a420453c Mon Sep 17 00:00:00 2001 From: Terry Geng Date: Thu, 27 Feb 2020 08:19:31 +0800 Subject: [PATCH] fix: one-shot crash bot, #79 --- media/playlist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/playlist.py b/media/playlist.py index caf931b..7074e55 100644 --- a/media/playlist.py +++ b/media/playlist.py @@ -59,7 +59,7 @@ class PlayList(list): logging.debug("playlist: Next into the queue") if self.current_index < len(self) - 1: - if self.mode == "one-shot": + if self.mode == "one-shot" and self.current_index != -1: super().__delitem__(self.current_index) else: self.current_index += 1