diff --git a/etiquette/photodb.py b/etiquette/photodb.py index 5459c08..c2dbf5c 100644 --- a/etiquette/photodb.py +++ b/etiquette/photodb.py @@ -581,6 +581,7 @@ class PDBPhotoMixin: is_searchhidden = searchhelpers.normalize_is_searchhidden(is_searchhidden) sha256 = searchhelpers.normalize_sha256(sha256) mimetype = searchhelpers.normalize_extension(mimetype) + sha256 = searchhelpers.normalize_extension(sha256) within_directory = searchhelpers.normalize_within_directory(within_directory, warning_bag=warning_bag) yield_albums = searchhelpers.normalize_yield_albums(yield_albums) yield_photos = searchhelpers.normalize_yield_photos(yield_photos) @@ -671,6 +672,7 @@ class PDBPhotoMixin: 'has_tags': has_tags, 'has_thumbnail': has_thumbnail, 'mimetype': list(mimetype) or None, + 'sha256': list(sha256) or None, 'tag_musts': tag_musts or None, 'tag_mays': tag_mays or None, 'tag_forbids': tag_forbids or None, diff --git a/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py b/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py index 3d44511..1a929fc 100644 --- a/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py +++ b/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py @@ -377,6 +377,7 @@ def get_search_core(): extension = request.args.get('extension') extension_not = request.args.get('extension_not') mimetype = request.args.get('mimetype') + sha256 = request.args.get('sha256') is_searchhidden = request.args.get('is_searchhidden', False) yield_albums = request.args.get('yield_albums', True) yield_photos = request.args.get('yield_photos', True) @@ -427,6 +428,7 @@ def get_search_core(): 'has_thumbnail': has_thumbnail, 'is_searchhidden': is_searchhidden, 'mimetype': mimetype, + 'sha256': sha256, 'tag_musts': tag_musts, 'tag_mays': tag_mays, 'tag_forbids': tag_forbids, diff --git a/frontends/etiquette_flask/templates/photo.html b/frontends/etiquette_flask/templates/photo.html index 62e4ead..a16e5e5 100644 --- a/frontends/etiquette_flask/templates/photo.html +++ b/frontends/etiquette_flask/templates/photo.html @@ -202,6 +202,7 @@
  • Overall bitrate: {{photo.bitrate|int}} kbps
  • {% endif %}
  • Created {{photo.created|timestamp_to_naturaldate}}
  • +
  • SHA256: {{photo.sha256[:16]}}
  • {% if request.is_localhost %}