From 1aad110d5a890241054a48ed675b8575ad5db989 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 1 Oct 2021 08:55:14 +0200 Subject: [PATCH] dfsfsd --- files/templates/submission.html | 10 +++++----- files/templates/submission_listing.html | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/templates/submission.html b/files/templates/submission.html index f5b5812158..6de642647f 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -80,7 +80,7 @@ -{% if p.url.lower().endswith('.mp4') %} +{% if p.url and p.url.lower().endswith('.mp4') %} {% endif %} @@ -109,7 +109,7 @@ -{% if p.url.lower().endswith('.mp4') %} +{% if p.url and p.url.lower().endswith('.mp4') %} {% endif %} @@ -316,7 +316,7 @@

 
-							{% elif not p.embed_url and not p.is_image and not p.url.lower().endswith('.mp4') %}
+							{% elif not p.embed_url and not p.is_image and not (p.url and p.url.lower().endswith('.mp4')) %}
 								
 									
{{p.domain|truncate(30, True)}} @@ -335,7 +335,7 @@

-							{% elif p.url.lower().endswith('.mp4') %}
+							{% elif p.url and p.url.lower().endswith('.mp4') %}
 								
- {% if not p.is_image and not p.url.lower().endswith('.mp4') %} + {% if not p.is_image and not (p.url and p.url.lower().endswith('.mp4')) %}
diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 8f4a386d6b..2dafeb1a69 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -102,7 +102,7 @@ - {% elif p.url.lower().endswith('.mp4') or (p.embed_url and "youtu" in p.domain) or (p.url and "streamable.com/e/" in p.url) %} + {% elif (p.url and p.url.lower().endswith('.mp4')) or (p.embed_url and "youtu" in p.domain) or (p.url and "streamable.com/e/" in p.url) %} @@ -443,7 +443,7 @@
{% endif %} - {% if p.url.lower().endswith('.mp4') %} + {% if p.url and p.url.lower().endswith('.mp4') %}