From 602eb9b90feab6688f964deebe6103f298d6055c Mon Sep 17 00:00:00 2001 From: meeb Date: Wed, 9 Dec 2020 19:54:34 +1100 Subject: [PATCH] use can_download flag for media front end messages --- app/common/templates/errorbox.html | 2 +- app/sync/templates/sync/media-item.html | 1 + app/sync/templates/sync/media.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/common/templates/errorbox.html b/app/common/templates/errorbox.html index e052b0de..9c1d95fd 100644 --- a/app/common/templates/errorbox.html +++ b/app/common/templates/errorbox.html @@ -3,7 +3,7 @@
- {{ message|safe }} + {{ message|safe }}
diff --git a/app/sync/templates/sync/media-item.html b/app/sync/templates/sync/media-item.html index ae15d3ee..39588cde 100644 --- a/app/sync/templates/sync/media-item.html +++ b/app/sync/templates/sync/media-item.html @@ -10,6 +10,7 @@

Saving to: {{ media.source.directory_path }}

+{% if not media.can_download %}{% include 'errorbox.html' with message='Media cannot be downloaded because it has no formats which match the source requirements.' %}{% endif %}
diff --git a/app/sync/templates/sync/media.html b/app/sync/templates/sync/media.html index 5e2f35e6..de8fef42 100644 --- a/app/sync/templates/sync/media.html +++ b/app/sync/templates/sync/media.html @@ -18,7 +18,7 @@ {{ m.source }}
{{ m.name }}
- {{ m.published|date:'Y-m-d' }} + {% if m.can_download %}{{ m.published|date:'Y-m-d' }}{% else %} No matching formats{% endif %}