From 3dac91ef2c700363bb949094836e232a7b30e3f0 Mon Sep 17 00:00:00 2001
From: Magnus Giesbert <magnus.giesbert@rwth-aachen.de>
Date: Sun, 1 Aug 2021 23:55:37 +0200
Subject: [PATCH] add download attribute to downloadbutton macro

---
 templates/macros.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/macros.html b/templates/macros.html
index c442d9d..fc10157 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -194,7 +194,7 @@ $(function() {
 <button class="btn btn-default dropdown-toggle{% if not videos|selectattr('downloadable')|list and not ismod() %} disabled{% endif %}" type="button" data-toggle="dropdown">Download <span class="caret"></span></button>
 <ul class="dropdown-menu">
 	{% for v in videos|sort(attribute='formats.prio', reverse=True) if (v.downloadable or ismod() ) %}
-	<li><a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a></li>
+	<li><a href="{{ config.VIDEOPREFIX }}/{{v.path}}" download>{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a></li>
 	{% endfor %}
 </ul>
 {% endif %}
@@ -206,7 +206,7 @@ $(function() {
 	<li>
 		{{moderator_delete(['videos',v.id,'deleted'])}}
 		{{ moderator_checkbox(['videos',v.id,'visible'], v.visible) }}
-		<a href="{{ config.VIDEOPREFIX }}/{{v.path}}">{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a>
+		<a href="{{ config.VIDEOPREFIX }}/{{v.path}}" download>{{v.formats.description}} ({{v.file_size|filesizeformat(true)}})</a>
 		{% if v.source %}
 		<a href="{{url_for('add_reencode_job', ref=request.url, videoid=v.id)}}" class="btn btn-default" data-toggle="tooltip" title="Video neu transcoden">
 			<span class="glyphicon glyphicon-refresh"></span>
-- 
GitLab