From bd7df400aab86540d2d8dd720fdc139740ff003d Mon Sep 17 00:00:00 2001 From: freamon Date: Sun, 12 May 2024 10:31:04 +0100 Subject: [PATCH 1/2] Add 'loop' attribute for videos in 'gifs' communities --- app/models.py | 3 +++ app/templates/post/_post_full.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models.py b/app/models.py index e202529c..c21f849f 100644 --- a/app/models.py +++ b/app/models.py @@ -545,6 +545,9 @@ class Community(db.Model): return True return False + def loop_videos(self) -> bool: + return 'gifs' in self.name + def delete_dependencies(self): for post in self.posts: post.delete_dependencies() diff --git a/app/templates/post/_post_full.html b/app/templates/post/_post_full.html index 8c77aad7..43602c50 100644 --- a/app/templates/post/_post_full.html +++ b/app/templates/post/_post_full.html @@ -85,7 +85,7 @@

{% elif post.url.endswith('.mp4') or post.url.endswith('.webm') %}

-

{% if post.url.endswith('.mp4') or post.url.endswith('.webm') %}

-