images are not video

This commit is contained in:
j 2010-12-27 10:37:15 +05:30
parent 02f787d062
commit 4c1619a4a1
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,8 @@ class File(models.Model):
self.display_aspect_ratio = "%s:%s" % (self.width, self.height)
self.is_video = True
self.is_audio = False
if self.name.endswith('.jpg') or self.name.endswith('.png') or self.duration == 0.04:
self.is_video = False
else:
self.is_video = False
if 'audio' in self.info and self.info['audio']: