|
|
|
@ -245,6 +245,7 @@ struct VideoPreferences
|
|
|
|
|
property extend_desc : Bool
|
|
|
|
|
property video_start : Float64 | Int32
|
|
|
|
|
property volume : Int32
|
|
|
|
|
property vr_mode : Bool
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
struct Video
|
|
|
|
@ -1057,6 +1058,7 @@ def process_video_params(query, preferences)
|
|
|
|
|
video_loop = query["loop"]?.try { |q| (q == "true" || q == "1").to_unsafe }
|
|
|
|
|
extend_desc = query["extend_desc"]?.try { |q| (q == "true" || q == "1").to_unsafe }
|
|
|
|
|
volume = query["volume"]?.try &.to_i?
|
|
|
|
|
vr_mode = query["vr_mode"]?.try { |q| (q == "true" || q == "1").to_unsafe }
|
|
|
|
|
|
|
|
|
|
if preferences
|
|
|
|
|
# region ||= preferences.region
|
|
|
|
@ -1076,6 +1078,7 @@ def process_video_params(query, preferences)
|
|
|
|
|
video_loop ||= preferences.video_loop.to_unsafe
|
|
|
|
|
extend_desc ||= preferences.extend_desc.to_unsafe
|
|
|
|
|
volume ||= preferences.volume
|
|
|
|
|
vr_mode ||= preferences.vr_mode.to_unsafe
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
annotations ||= CONFIG.default_user_preferences.annotations.to_unsafe
|
|
|
|
@ -1094,6 +1097,7 @@ def process_video_params(query, preferences)
|
|
|
|
|
video_loop ||= CONFIG.default_user_preferences.video_loop.to_unsafe
|
|
|
|
|
extend_desc ||= CONFIG.default_user_preferences.extend_desc.to_unsafe
|
|
|
|
|
volume ||= CONFIG.default_user_preferences.volume
|
|
|
|
|
vr_mode ||= CONFIG.default_user_preferences.vr_mode.to_unsafe
|
|
|
|
|
|
|
|
|
|
annotations = annotations == 1
|
|
|
|
|
autoplay = autoplay == 1
|
|
|
|
@ -1104,6 +1108,7 @@ def process_video_params(query, preferences)
|
|
|
|
|
related_videos = related_videos == 1
|
|
|
|
|
video_loop = video_loop == 1
|
|
|
|
|
extend_desc = extend_desc == 1
|
|
|
|
|
vr_mode = vr_mode == 1
|
|
|
|
|
|
|
|
|
|
if CONFIG.disabled?("dash") && quality == "dash"
|
|
|
|
|
quality = "high"
|
|
|
|
@ -1153,6 +1158,7 @@ def process_video_params(query, preferences)
|
|
|
|
|
extend_desc: extend_desc,
|
|
|
|
|
video_start: video_start,
|
|
|
|
|
volume: volume,
|
|
|
|
|
vr_mode: vr_mode
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return params
|
|
|
|
|