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 @@