aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaiyed Shizain <saiyedshizain@gmail.com>2026-09-01 23:22:57 +0530
committerSaiyed Shizain <saiyedshizain@gmail.com>2026-09-01 23:22:57 +0530
commite7cf1fc44ded2be04f3ff144c29bfc73bed809c8 (patch)
tree0535b1eae4cf0fa21d24e2ed3e7ab4875c0e70f6
parent5a51d4a74b5a656a1b11c4636956abe23c975d17 (diff)
downloadgalleryd-e7cf1fc44ded2be04f3ff144c29bfc73bed809c8.tar.xz
galleryd-e7cf1fc44ded2be04f3ff144c29bfc73bed809c8.zip
Revert "feat(gallery): add date range to gallery queries"HEADmain
This reverts commit 5a51d4a74b5a656a1b11c4636956abe23c975d17.
-rw-r--r--internal/gallery/query.go5
-rw-r--r--internal/gallery/query_photos_test.go50
2 files changed, 0 insertions, 55 deletions
diff --git a/internal/gallery/query.go b/internal/gallery/query.go
index 355aa2e..346c25f 100644
--- a/internal/gallery/query.go
+++ b/internal/gallery/query.go
@@ -1,7 +1,5 @@
package gallery
-import "time"
-
type SortField string
const (
@@ -29,7 +27,4 @@ type Query struct {
Extension string
Search string
-
- From time.Time
- To time.Time
}
diff --git a/internal/gallery/query_photos_test.go b/internal/gallery/query_photos_test.go
index e5ef560..f38c237 100644
--- a/internal/gallery/query_photos_test.go
+++ b/internal/gallery/query_photos_test.go
@@ -409,53 +409,3 @@ func TestQueryPhotosFilterSearchSortThenPaginate(t *testing.T) {
assertIDs(t, got, "5")
}
-
-func TestQueryPhotosIgnoresDateRangesForNow(t *testing.T) {
- photos := []Photo{
- {
- ID: "old",
- Metadata: metadata.Metadata{
- DateTaken: time.Date(
- 2024,
- 1,
- 1,
- 0,
- 0,
- 0,
- 0,
- time.UTC,
- ),
- },
- },
- {
- ID: "new",
- Metadata: metadata.Metadata{
- DateTaken: time.Date(
- 2025,
- 1,
- 1,
- 0,
- 0,
- 0,
- 0,
- time.UTC,
- ),
- },
- },
- }
-
- got := QueryPhotos(photos, Query{
- From: time.Date(
- 2025,
- 1,
- 1,
- 0,
- 0,
- 0,
- 0,
- time.UTC,
- ),
- })
-
- assertIDs(t, got, "old", "new")
-}