diff --git a/etiquette/jsonify.py b/etiquette/jsonify.py index ec36447..9046622 100644 --- a/etiquette/jsonify.py +++ b/etiquette/jsonify.py @@ -48,7 +48,7 @@ def photo(p, include_albums=True, include_tags=True): 'bytes': p.bytes, 'duration_str': p.duration_string, 'duration': p.duration, - 'bytes_str': p.bytestring(), + 'bytes_str': p.bytestring, 'has_thumbnail': bool(p.thumbnail), 'created': p.created, 'filename': p.basename, diff --git a/etiquette/objects.py b/etiquette/objects.py index 4adeb22..fc4ff31 100644 --- a/etiquette/objects.py +++ b/etiquette/objects.py @@ -635,6 +635,7 @@ class Photo(ObjectBase): self.photodb.commit() return tag + @property def bytestring(self): if self.bytes is not None: return bytestring.bytestring(self.bytes) diff --git a/frontends/etiquette_flask/templates/photo.html b/frontends/etiquette_flask/templates/photo.html index 4163ec7..cba4e54 100644 --- a/frontends/etiquette_flask/templates/photo.html +++ b/frontends/etiquette_flask/templates/photo.html @@ -192,7 +192,7 @@
  • Dimensions: {{photo.width}}x{{photo.height}} px
  • Aspect ratio: {{photo.ratio}}
  • {% endif %} -
  • Size: {{photo.bytestring()}}
  • +
  • Size: {{photo.bytestring}}
  • {% if photo.duration %}
  • Duration: {{photo.duration_string}}
  • Overall Bitrate: {{photo.bitrate|int}} kbps
  • diff --git a/frontends/etiquette_flask/templates/photo_card.html b/frontends/etiquette_flask/templates/photo_card.html index 39581ba..8292fea 100644 --- a/frontends/etiquette_flask/templates/photo_card.html +++ b/frontends/etiquette_flask/templates/photo_card.html @@ -20,7 +20,7 @@
    {{photo.basename}} - {{photo.bytestring()}} + {{photo.bytestring}}
    {% else %} @@ -69,7 +69,7 @@ {{- metadata_inner|safe -}} - {{photo.bytestring()}} + {{photo.bytestring}}