aboutsummaryrefslogtreecommitdiff
path: root/internal/gallery
diff options
context:
space:
mode:
authorSaiyed Shizain <saiyedshizain@gmail.com>2026-08-25 19:34:09 +0530
committerSaiyed Shizain <saiyedshizain@gmail.com>2026-08-25 19:34:09 +0530
commit2ca59223f20029a3a4a351b22706b2b4d47ad6e3 (patch)
tree43b97a03e4eaf9214b04bd259d7d263c7d492150 /internal/gallery
parent816c1506b2ccf081a5792ce676bcad7a7d6841fc (diff)
downloadgalleryd-2ca59223f20029a3a4a351b22706b2b4d47ad6e3.tar.xz
galleryd-2ca59223f20029a3a4a351b22706b2b4d47ad6e3.zip
feat(gallery): add search query to gallery queries
Diffstat (limited to 'internal/gallery')
-rw-r--r--internal/gallery/query.go1
-rw-r--r--internal/gallery/query_photos_test.go10
2 files changed, 11 insertions, 0 deletions
diff --git a/internal/gallery/query.go b/internal/gallery/query.go
index b66f99a..346c25f 100644
--- a/internal/gallery/query.go
+++ b/internal/gallery/query.go
@@ -26,4 +26,5 @@ type Query struct {
Order SortOrder
Extension string
+ Search string
}
diff --git a/internal/gallery/query_photos_test.go b/internal/gallery/query_photos_test.go
index b72b6ec..b60cfea 100644
--- a/internal/gallery/query_photos_test.go
+++ b/internal/gallery/query_photos_test.go
@@ -311,3 +311,13 @@ func TestQueryPhotosFilterThenSortThenPaginate(t *testing.T) {
assertIDs(t, got, "3")
}
+
+func TestQueryPhotosIgnoreSearchForNow(t *testing.T) {
+ photos := makePhotos(3)
+
+ got := QueryPhotos(photos, Query{
+ Search: "vacation",
+ })
+
+ assertIDs(t, got, "0", "1", "2")
+}