mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-18 18:48:29 +00:00
Add clip_urls property in user preferences
This commit is contained in:
parent
7aa41f4009
commit
571da451a6
@ -43,6 +43,7 @@ struct ConfigPreferences
|
||||
property vr_mode : Bool = true
|
||||
property show_nick : Bool = true
|
||||
property save_player_pos : Bool = false
|
||||
property clip_urls : Bool = true
|
||||
|
||||
def to_tuple
|
||||
{% begin %}
|
||||
|
@ -60,7 +60,7 @@ module Invidious::Routes::Watch
|
||||
env.params.query.delete_all("listen")
|
||||
|
||||
begin
|
||||
video = get_video(id, region: params.region)
|
||||
video = get_video(id, region: params.region, clip_urls: preferences.clip_urls)
|
||||
rescue ex : VideoRedirect
|
||||
return env.redirect env.request.resource.gsub(id, ex.video_id)
|
||||
rescue ex
|
||||
|
@ -54,6 +54,7 @@ struct Preferences
|
||||
property extend_desc : Bool = CONFIG.default_user_preferences.extend_desc
|
||||
property volume : Int32 = CONFIG.default_user_preferences.volume
|
||||
property save_player_pos : Bool = CONFIG.default_user_preferences.save_player_pos
|
||||
property clip_urls : Bool = CONFIG.default_user_preferences.clip_urls
|
||||
|
||||
module BoolToString
|
||||
def self.to_json(value : String, json : JSON::Builder)
|
||||
|
Loading…
Reference in New Issue
Block a user