fix typeerror when setting volume; fix processing of volume updates in client-side webinterface
This commit is contained in:
parent
f95e07c9af
commit
08c76aab9d
@ -406,7 +406,7 @@ def post():
|
||||
elif action == "volume_set_value":
|
||||
if 'new_volume' in request.form:
|
||||
# new_volume is slider value ranging from 0-100
|
||||
var.bot.volume_set = (request.form['new_volume'] * 0.01)
|
||||
var.bot.volume_set = (int(request.form['new_volume']) * 0.01)
|
||||
if var.bot.volume_set > 1:
|
||||
var.bot.volume_set = 1
|
||||
elif var.bot.volume_set < 0:
|
||||
|
@ -724,7 +724,7 @@
|
||||
$("#random-btn").removeClass("btn-primary").addClass("btn-secondary").prop("disabled", false);
|
||||
$("#autoplay-btn").removeClass("btn-secondary").addClass("btn-primary").prop("disabled", true);
|
||||
}
|
||||
$("#volume-slider").value = volume;
|
||||
document.getElementById("volume-slider").value = Math.round(volume*100);
|
||||
}
|
||||
|
||||
function themeInit(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user