From a27a916a1fcb9f62a9f075d1316346ff2e6424b2 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 6 Aug 2018 17:05:33 +0200 Subject: Add video list and video thumbnails Add a separate video page for listing uploaded videos. The thumbnail endpoint now supports generating video thumbnails using ffmpegthumbnailer. --- fbin/db.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fbin/db.py') diff --git a/fbin/db.py b/fbin/db.py index 5323134..58bf8ab 100644 --- a/fbin/db.py +++ b/fbin/db.py @@ -98,6 +98,9 @@ class File(Base): def is_image(self): return self.get_mime_type().startswith('image') + def is_video(self): + return self.get_mime_type().startswith('video') + @property def ext(self): return os.path.splitext(self.filename)[1] -- cgit v1.2.3