summaryrefslogtreecommitdiff
path: root/fbin/db.py
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2018-08-06 17:05:33 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2018-08-06 17:09:04 +0200
commita27a916a1fcb9f62a9f075d1316346ff2e6424b2 (patch)
tree178704da15f77d8c038160cf18d6b2876744c23b /fbin/db.py
parente1e82a8c93b667ac9dd35a6dd34cb30e26545798 (diff)
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.
Diffstat (limited to 'fbin/db.py')
-rw-r--r--fbin/db.py3
1 files changed, 3 insertions, 0 deletions
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]