fix: one-shot crash bot, #79

This commit is contained in:
Terry Geng 2020-02-27 08:19:31 +08:00
parent d00fc9306c
commit 5491f00c34

View File

@ -59,7 +59,7 @@ class PlayList(list):
logging.debug("playlist: Next into the queue") logging.debug("playlist: Next into the queue")
if self.current_index < len(self) - 1: 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) super().__delitem__(self.current_index)
else: else:
self.current_index += 1 self.current_index += 1