mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-16 09:58:50 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -144,6 +144,8 @@ module Invidious::Routes::PreferencesRoute
|
||||
notifications_only ||= "off"
|
||||
notifications_only = notifications_only == "on"
|
||||
|
||||
default_playlist = env.params.body["default_playlist"]?.try &.as(String)
|
||||
|
||||
hidden_channels = env.params.body["hidden_channels"]?.try &.as(String)
|
||||
if hidden_channels
|
||||
hidden_channels = hidden_channels.split("\n")
|
||||
@@ -171,6 +173,7 @@ module Invidious::Routes::PreferencesRoute
|
||||
default_trending_type = env.params.body["default_trending_type"]?.try &.as(String)
|
||||
default_trending_type ||= Invidious::Routes::Feeds::TrendingTypes::Default
|
||||
|
||||
|
||||
# Convert to JSON and back again to take advantage of converters used for compatibility
|
||||
preferences = Preferences.from_json({
|
||||
annotations: annotations,
|
||||
@@ -207,6 +210,7 @@ module Invidious::Routes::PreferencesRoute
|
||||
vr_mode: vr_mode,
|
||||
show_nick: show_nick,
|
||||
save_player_pos: save_player_pos,
|
||||
default_playlist: default_playlist,
|
||||
hidden_channels: hidden_channels,
|
||||
default_trending_type: default_trending_type,
|
||||
}.to_json)
|
||||
|
||||
Reference in New Issue
Block a user