fix: 'jump' doesn't play the music if paused.
This commit is contained in:
parent
ec28902f66
commit
457f1c691f
@ -176,7 +176,10 @@ def cmd_play(bot, user, text, command, parameter):
|
||||
# the one you want
|
||||
var.playlist.point_to(int(parameter) - 1 - 1)
|
||||
|
||||
bot.interrupt()
|
||||
if not bot.is_pause:
|
||||
bot.interrupt()
|
||||
else:
|
||||
bot.is_pause = False
|
||||
else:
|
||||
bot.send_msg(constants.strings('invalid_index', index=parameter), text)
|
||||
|
||||
|
@ -292,7 +292,10 @@ def post():
|
||||
|
||||
if len(var.playlist) >= int(request.form['play_music']):
|
||||
var.playlist.point_to(int(request.form['play_music']) - 1)
|
||||
var.bot.interrupt()
|
||||
if not var.bot.is_pause:
|
||||
var.bot.interrupt()
|
||||
else:
|
||||
var.bot.is_pause = False
|
||||
time.sleep(0.1)
|
||||
|
||||
elif 'delete_music_file' in request.form and ".." not in request.form['delete_music_file']:
|
||||
|
Loading…
x
Reference in New Issue
Block a user