diff --git a/etiquette/objects.py b/etiquette/objects.py index 07fc809..e4868d5 100644 --- a/etiquette/objects.py +++ b/etiquette/objects.py @@ -499,6 +499,8 @@ class Photo(ObjectBase): self.ratio = db_row['ratio'] self.thumbnail = db_row['thumbnail'] + if self.duration: + self.bitrate = (self.bytes / 128) / self.duration self.mimetype = helpers.get_mimetype(self.real_filepath) if self.mimetype is None: self.simple_mimetype = None diff --git a/frontends/etiquette_flask/templates/photo.html b/frontends/etiquette_flask/templates/photo.html index f22bdd6..8d50d16 100644 --- a/frontends/etiquette_flask/templates/photo.html +++ b/frontends/etiquette_flask/templates/photo.html @@ -183,7 +183,7 @@