mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-15 01:48:33 +00:00
fix: restore dmca_content functionality
This restores (or adds) the functionality of the `dmca_content` config option that at this date, has been unused and makes no effect.
This commit is contained in:
parent
df8839d1f0
commit
9bc9cc8cab
@ -502,5 +502,6 @@
|
||||
"carousel_go_to": "Go to slide `x`",
|
||||
"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_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."
|
||||
}
|
||||
|
@ -30,6 +30,10 @@ module Invidious::Routes::Watch
|
||||
return env.redirect "/"
|
||||
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_-]/, "")
|
||||
continuation = process_continuation(env.params.query, plid, id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user