diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-04-03 14:53:28 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-04-03 14:54:38 -0500 |
| commit | f6615a490d830b69e3ead47e188e175912d1775d (patch) | |
| tree | 947882514930a19bfff82854bc901702ab06bc53 | |
| parent | bd4f5ebcdfb2e4bcbe7872fc76cdbf26e7dd4f80 (diff) | |
| download | invidious-f6615a490d830b69e3ead47e188e175912d1775d.tar.gz invidious-f6615a490d830b69e3ead47e188e175912d1775d.tar.bz2 invidious-f6615a490d830b69e3ead47e188e175912d1775d.zip | |
Allow disabling download widget for specific videos (in compliance with DMCA)
| -rw-r--r-- | src/invidious/helpers/helpers.cr | 1 | ||||
| -rw-r--r-- | src/invidious/views/watch.ecr | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index f6c22f64..792fec11 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 2aa43623..18cbdef7 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -57,6 +57,9 @@ <div class="h-box"> <p><a href="https://www.youtube.com/watch?v=<%= video.id %>"><%= translate(locale, "Watch video on Youtube") %></a></p> + <% if CONFIG.dmca_content.includes? video.id %> + <p>Download is disabled.</p> + <% else %> <form class="pure-form pure-form-stacked" action="/latest_version" method="get" rel="noopener" target="_blank"> <div class="pure-control-group"> <label for="download_widget"><%= translate(locale, "Download as: ") %></label> @@ -83,6 +86,7 @@ <b><%= translate(locale, "Download") %></b> </button> </form> + <% end %> <p><i class="icon ion-ios-eye"></i> <%= number_with_separator(video.views) %></p> <p><i class="icon ion-ios-thumbs-up"></i> <%= number_with_separator(video.likes) %></p> |
