diff --git a/etiquette/jsonify.py b/etiquette/jsonify.py index 395e940..95c030b 100644 --- a/etiquette/jsonify.py +++ b/etiquette/jsonify.py @@ -33,7 +33,7 @@ def photo(p, include_albums=True, include_tags=True): 'ratio': p.ratio, 'area': p.area, 'bytes': p.bytes, - 'duration_str': p.duration_string(), + 'duration_str': p.duration_string, 'duration': p.duration, 'bytes_str': p.bytestring(), 'has_thumbnail': bool(p.thumbnail), diff --git a/etiquette/objects.py b/etiquette/objects.py index 6b679dd..dcca034 100644 --- a/etiquette/objects.py +++ b/etiquette/objects.py @@ -505,6 +505,7 @@ class Photo(ObjectBase): self.photodb.log.debug('Committing - delete photo') self.photodb.commit() + @property def duration_string(self): if self.duration is None: return None diff --git a/templates/photo.html b/templates/photo.html index 23e30c2..b30fb5e 100644 --- a/templates/photo.html +++ b/templates/photo.html @@ -169,7 +169,7 @@ {% endif %}