aboutsummaryrefslogtreecommitdiff
path: root/src/invidious/routes/preferences.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/invidious/routes/preferences.cr')
-rw-r--r--src/invidious/routes/preferences.cr5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr
index 570cba69..238c1bfa 100644
--- a/src/invidious/routes/preferences.cr
+++ b/src/invidious/routes/preferences.cr
@@ -51,6 +51,10 @@ module Invidious::Routes::PreferencesRoute
51 watch_history ||= "off" 51 watch_history ||= "off"
52 watch_history = watch_history == "on" 52 watch_history = watch_history == "on"
53 53
54 notifications = env.params.body["notifications"]?.try &.as(String)
55 notifications ||= "off"
56 notifications = notifications == "on"
57
54 speed = env.params.body["speed"]?.try &.as(String).to_f32? 58 speed = env.params.body["speed"]?.try &.as(String).to_f32?
55 speed ||= CONFIG.default_user_preferences.speed 59 speed ||= CONFIG.default_user_preferences.speed
56 60
@@ -154,6 +158,7 @@ module Invidious::Routes::PreferencesRoute
154 listen: listen, 158 listen: listen,
155 local: local, 159 local: local,
156 watch_history: watch_history, 160 watch_history: watch_history,
161 notifications: notifications,
157 locale: locale, 162 locale: locale,
158 max_results: max_results, 163 max_results: max_results,
159 notifications_only: notifications_only, 164 notifications_only: notifications_only,