From 445ff856fe73ff3d08205431b5679108adbe17f3 Mon Sep 17 00:00:00 2001 From: syeopite Date: Mon, 24 May 2021 09:16:58 -0700 Subject: [PATCH] Allow user preferences to effect extend_desc --- src/invidious/routes/preferences.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr index 815c1c705..cfdad4433 100644 --- a/src/invidious/routes/preferences.cr +++ b/src/invidious/routes/preferences.cr @@ -60,6 +60,10 @@ class Invidious::Routes::PreferencesRoute < Invidious::Routes::BaseRoute volume = env.params.body["volume"]?.try &.as(String).to_i? volume ||= CONFIG.default_user_preferences.volume + extend_desc = env.params.body["extend_desc"]?.try &.as(String) + extend_desc ||= "off" + extend_desc = extend_desc == "on" + vr_mode = env.params.body["vr_mode"]?.try &.as(String) vr_mode ||= "off" vr_mode = vr_mode == "on" @@ -144,6 +148,7 @@ class Invidious::Routes::PreferencesRoute < Invidious::Routes::BaseRoute unseen_only: unseen_only, video_loop: video_loop, volume: volume, + extend_desc: extend_desc, vr_mode: vr_mode, }.to_json).to_json