fix: pause error when playlist is empty
This commit is contained in:
parent
3330017586
commit
266a17617d
@ -625,8 +625,9 @@ class MumbleBot:
|
|||||||
self.interrupt()
|
self.interrupt()
|
||||||
self.is_pause = True
|
self.is_pause = True
|
||||||
self.song_start_at = -1
|
self.song_start_at = -1
|
||||||
self.pause_at_id = var.playlist.current_item().id
|
if len(var.playlist) > 0:
|
||||||
self.log.info("bot: music paused at %.2f seconds." % self.playhead)
|
self.pause_at_id = var.playlist.current_item().id
|
||||||
|
self.log.info("bot: music paused at %.2f seconds." % self.playhead)
|
||||||
|
|
||||||
def resume(self):
|
def resume(self):
|
||||||
self.is_pause = False
|
self.is_pause = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user