mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-06-28 01:48:26 +00:00
feat(frontend): config option to disable video downloads
This commit is contained in:
parent
ea587758a5
commit
b9114cbb9d
@ -244,6 +244,8 @@ class Config
|
||||
|
||||
property max_popular_results : Int32 = 40
|
||||
|
||||
property disable_video_downloads : Bool = false
|
||||
|
||||
{% if flag?(:linux) %}
|
||||
property reload_config_automatically : Bool = true
|
||||
{% end %}
|
||||
|
@ -52,6 +52,7 @@ module Invidious::Frontend::WatchPage
|
||||
|
||||
# Non-DASH videos (audio+video)
|
||||
|
||||
if !CONFIG.disable_video_downloads
|
||||
video_assets.full_videos.each do |option|
|
||||
mimetype = option["mimeType"].as_s.split(";")[0]
|
||||
|
||||
@ -63,9 +64,10 @@ module Invidious::Frontend::WatchPage
|
||||
str << (height || "~240") << "p - " << mimetype
|
||||
str << "</option>\n"
|
||||
end
|
||||
|
||||
end
|
||||
# DASH video streams
|
||||
|
||||
if !CONFIG.disable_video_downloads
|
||||
video_assets.video_streams.each do |option|
|
||||
mimetype = option["mimeType"].as_s.split(";")[0]
|
||||
|
||||
@ -75,6 +77,7 @@ module Invidious::Frontend::WatchPage
|
||||
str << option["qualityLabel"] << " - " << mimetype << " @ " << option["fps"] << "fps - video only"
|
||||
str << "</option>\n"
|
||||
end
|
||||
end
|
||||
|
||||
# DASH audio streams
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user