diff --git a/etiquette/photodb.py b/etiquette/photodb.py
index 8e58a78..3b5ab07 100644
--- a/etiquette/photodb.py
+++ b/etiquette/photodb.py
@@ -675,6 +675,7 @@ class PDBPhotoMixin:
has_thumbnail = searchhelpers.normalize_has_thumbnail(has_thumbnail)
is_searchhidden = searchhelpers.normalize_is_searchhidden(is_searchhidden)
mimetype = searchhelpers.normalize_extension(mimetype)
+ yield_albums = searchhelpers.normalize_yield_albums(yield_albums)
if has_tags is False:
tag_musts = None
@@ -763,6 +764,7 @@ class PDBPhotoMixin:
'limit': limit,
'offset': offset or None,
'orderby': giveback_orderby or None,
+ 'yield_albums': yield_albums,
}
yield parameters
diff --git a/etiquette/searchhelpers.py b/etiquette/searchhelpers.py
index 13bcd6c..922ce08 100644
--- a/etiquette/searchhelpers.py
+++ b/etiquette/searchhelpers.py
@@ -385,6 +385,12 @@ def normalize_tag_expression(expression):
return expression
+def normalize_yield_albums(yield_albums):
+ '''
+ See etiquette.helpers.truthystring.
+ '''
+ return helpers.truthystring(yield_albums)
+
EXIST_FORMAT = '''
{operator} (
SELECT 1 FROM photo_tag_rel WHERE photos.id == photo_tag_rel.photoid
diff --git a/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py b/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py
index f154432..d088a9f 100644
--- a/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py
+++ b/frontends/etiquette_flask/backend/endpoints/photo_endpoints.py
@@ -325,6 +325,7 @@ def get_search_core():
extension_not = request.args.get('extension_not')
mimetype = request.args.get('mimetype')
is_searchhidden = request.args.get('is_searchhidden', False)
+ yield_albums = request.args.get('yield_albums', True)
limit = request.args.get('limit')
# This is being pre-processed because the site enforces a maximum value
@@ -378,7 +379,9 @@ def get_search_core():
'orderby': orderby,
'warning_bag': warning_bag,
- 'give_back_parameters': True
+ 'give_back_parameters': True,
+
+ 'yield_albums': yield_albums,
}
# print(search_kwargs)
search_generator = common.P.search(**search_kwargs)
diff --git a/frontends/etiquette_flask/templates/search.html b/frontends/etiquette_flask/templates/search.html
index 3b149ca..e38ebbb 100644
--- a/frontends/etiquette_flask/templates/search.html
+++ b/frontends/etiquette_flask/templates/search.html
@@ -294,6 +294,10 @@
+