mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-15 18:08:29 +00:00
only disable download widget for dmca video ids
This commit is contained in:
parent
9bc9cc8cab
commit
a218dadad6
@ -503,5 +503,5 @@
|
|||||||
"timeline_parse_error_placeholder_heading": "Unable to parse item",
|
"timeline_parse_error_placeholder_heading": "Unable to parse item",
|
||||||
"timeline_parse_error_placeholder_message": "Invidious encountered an error while trying to parse this item. For more information see below:",
|
"timeline_parse_error_placeholder_message": "Invidious encountered an error while trying to parse this item. For more information see below:",
|
||||||
"timeline_parse_error_show_technical_details": "Show technical details",
|
"timeline_parse_error_show_technical_details": "Show technical details",
|
||||||
"dmca_content": "Sorry, this video cannot be played on this instance due to a DMCA/copyright infringement letter sent to the instance administrator."
|
"dmca_content": "This video cannot be downloaded on this instance due to a DMCA/copyright infringement letter sent to the instance administrator."
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,10 @@ module Invidious::Frontend::WatchPage
|
|||||||
return "<p id=\"download\">#{translate(locale, "Download is disabled")}</p>"
|
return "<p id=\"download\">#{translate(locale, "Download is disabled")}</p>"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if CONFIG.dmca_content.includes?(video.id)
|
||||||
|
return "<p id=\"download\">#{translate(locale, "dmca_content")}</p>"
|
||||||
|
end
|
||||||
|
|
||||||
url = "/download"
|
url = "/download"
|
||||||
if (CONFIG.invidious_companion.present?)
|
if (CONFIG.invidious_companion.present?)
|
||||||
invidious_companion = CONFIG.invidious_companion.sample
|
invidious_companion = CONFIG.invidious_companion.sample
|
||||||
|
@ -30,10 +30,6 @@ module Invidious::Routes::Watch
|
|||||||
return env.redirect "/"
|
return env.redirect "/"
|
||||||
end
|
end
|
||||||
|
|
||||||
if CONFIG.dmca_content.includes?(id)
|
|
||||||
return error_template(403, "dmca_content")
|
|
||||||
end
|
|
||||||
|
|
||||||
plid = env.params.query["list"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
|
plid = env.params.query["list"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
|
||||||
continuation = process_continuation(env.params.query, plid, id)
|
continuation = process_continuation(env.params.query, plid, id)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user