From f6615a490d830b69e3ead47e188e175912d1775d Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 3 Apr 2019 14:53:28 -0500 Subject: [PATCH] Allow disabling download widget for specific videos (in compliance with DMCA) --- src/invidious/helpers/helpers.cr | 1 + src/invidious/views/watch.ecr | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index f6c22f647..792fec112 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -99,6 +99,7 @@ user: String, default: Preferences.new(*ConfigPreferences.from_yaml("").to_tuple), converter: ConfigPreferencesConverter, }, + dmca_content: {type: Array(String), default: [] of String}, # For compliance with DMCA, disables download widget using list of video IDs }) end diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 2aa436237..18cbdef79 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -57,6 +57,9 @@

<%= translate(locale, "Watch video on Youtube") %>

+ <% if CONFIG.dmca_content.includes? video.id %> +

Download is disabled.

+ <% else %>
@@ -83,6 +86,7 @@ <%= translate(locale, "Download") %> + <% end %>

<%= number_with_separator(video.views) %>

<%= number_with_separator(video.likes) %>