mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add 'local' option to preferences
This commit is contained in:
parent
21ebc398fa
commit
e738e57e26
14 changed files with 29 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue