|
|
@ -258,6 +258,7 @@ struct VideoPreferences
|
|
|
|
listen: Bool,
|
|
|
|
listen: Bool,
|
|
|
|
local: Bool,
|
|
|
|
local: Bool,
|
|
|
|
preferred_captions: Array(String),
|
|
|
|
preferred_captions: Array(String),
|
|
|
|
|
|
|
|
player_style: String,
|
|
|
|
quality: String,
|
|
|
|
quality: String,
|
|
|
|
raw: Bool,
|
|
|
|
raw: Bool,
|
|
|
|
region: String?,
|
|
|
|
region: String?,
|
|
|
@ -1264,6 +1265,7 @@ def process_video_params(query, preferences)
|
|
|
|
continue_autoplay = query["continue_autoplay"]?.try &.to_i?
|
|
|
|
continue_autoplay = query["continue_autoplay"]?.try &.to_i?
|
|
|
|
listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe
|
|
|
|
listen = query["listen"]? && (query["listen"] == "true" || query["listen"] == "1").to_unsafe
|
|
|
|
local = query["local"]? && (query["local"] == "true" || query["local"] == "1").to_unsafe
|
|
|
|
local = query["local"]? && (query["local"] == "true" || query["local"] == "1").to_unsafe
|
|
|
|
|
|
|
|
player_style = query["player_style"]?
|
|
|
|
preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase }
|
|
|
|
preferred_captions = query["subtitles"]?.try &.split(",").map { |a| a.downcase }
|
|
|
|
quality = query["quality"]?
|
|
|
|
quality = query["quality"]?
|
|
|
|
region = query["region"]?
|
|
|
|
region = query["region"]?
|
|
|
@ -1281,6 +1283,7 @@ def process_video_params(query, preferences)
|
|
|
|
continue_autoplay ||= preferences.continue_autoplay.to_unsafe
|
|
|
|
continue_autoplay ||= preferences.continue_autoplay.to_unsafe
|
|
|
|
listen ||= preferences.listen.to_unsafe
|
|
|
|
listen ||= preferences.listen.to_unsafe
|
|
|
|
local ||= preferences.local.to_unsafe
|
|
|
|
local ||= preferences.local.to_unsafe
|
|
|
|
|
|
|
|
player_style ||= preferences.player_style
|
|
|
|
preferred_captions ||= preferences.captions
|
|
|
|
preferred_captions ||= preferences.captions
|
|
|
|
quality ||= preferences.quality
|
|
|
|
quality ||= preferences.quality
|
|
|
|
related_videos ||= preferences.related_videos.to_unsafe
|
|
|
|
related_videos ||= preferences.related_videos.to_unsafe
|
|
|
@ -1296,6 +1299,7 @@ def process_video_params(query, preferences)
|
|
|
|
continue_autoplay ||= CONFIG.default_user_preferences.continue_autoplay.to_unsafe
|
|
|
|
continue_autoplay ||= CONFIG.default_user_preferences.continue_autoplay.to_unsafe
|
|
|
|
listen ||= CONFIG.default_user_preferences.listen.to_unsafe
|
|
|
|
listen ||= CONFIG.default_user_preferences.listen.to_unsafe
|
|
|
|
local ||= CONFIG.default_user_preferences.local.to_unsafe
|
|
|
|
local ||= CONFIG.default_user_preferences.local.to_unsafe
|
|
|
|
|
|
|
|
player_style ||= CONFIG.default_user_preferences.player_style
|
|
|
|
preferred_captions ||= CONFIG.default_user_preferences.captions
|
|
|
|
preferred_captions ||= CONFIG.default_user_preferences.captions
|
|
|
|
quality ||= CONFIG.default_user_preferences.quality
|
|
|
|
quality ||= CONFIG.default_user_preferences.quality
|
|
|
|
related_videos ||= CONFIG.default_user_preferences.related_videos.to_unsafe
|
|
|
|
related_videos ||= CONFIG.default_user_preferences.related_videos.to_unsafe
|
|
|
@ -1354,6 +1358,7 @@ def process_video_params(query, preferences)
|
|
|
|
controls: controls,
|
|
|
|
controls: controls,
|
|
|
|
listen: listen,
|
|
|
|
listen: listen,
|
|
|
|
local: local,
|
|
|
|
local: local,
|
|
|
|
|
|
|
|
player_style: player_style,
|
|
|
|
preferred_captions: preferred_captions,
|
|
|
|
preferred_captions: preferred_captions,
|
|
|
|
quality: quality,
|
|
|
|
quality: quality,
|
|
|
|
raw: raw,
|
|
|
|
raw: raw,
|
|
|
|