Don't leave bitrate undefined for non-temporal photos.

This commit is contained in:
voussoir 2017-05-12 17:50:31 -07:00
parent a4a278c173
commit 55c14f3844

View file

@ -501,6 +501,8 @@ class Photo(ObjectBase):
if self.duration: if self.duration:
self.bitrate = (self.bytes / 128) / self.duration self.bitrate = (self.bytes / 128) / self.duration
else:
self.bitrate = None
self.mimetype = helpers.get_mimetype(self.real_filepath) self.mimetype = helpers.get_mimetype(self.real_filepath)
if self.mimetype is None: if self.mimetype is None: