Add 'local' option to preferences

This commit is contained in:
Omar Roth 2019-03-12 21:05:49 -05:00
parent 21ebc398fa
commit e738e57e26
14 changed files with 29 additions and 2 deletions

View file

@ -1231,6 +1231,10 @@ post "/preferences" do |env|
listen ||= "off"
listen = listen == "on"
local = env.params.body["local"]?.try &.as(String)
local ||= "off"
local = local == "on"
speed = env.params.body["speed"]?.try &.as(String).to_f?
speed ||= DEFAULT_USER_PREFERENCES.speed
@ -1292,6 +1296,7 @@ post "/preferences" do |env|
"autoplay" => autoplay,
"continue" => continue,
"listen" => listen,
"local" => local,
"speed" => speed,
"quality" => quality,
"volume" => volume,