aboutsummaryrefslogtreecommitdiff
path: root/internal/gallery
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-07-22 18:33:40 +0530
committerRanXom <saiyedshizain@gmail.com>2026-07-22 18:33:40 +0530
commit816c1506b2ccf081a5792ce676bcad7a7d6841fc (patch)
treefb2c18314d6d099771d25b4c56ce665634b733ca /internal/gallery
parent8fb30a66a81a1f7150ebe86ed091e7c1651233a1 (diff)
downloadgalleryd-816c1506b2ccf081a5792ce676bcad7a7d6841fc.tar.xz
galleryd-816c1506b2ccf081a5792ce676bcad7a7d6841fc.zip
refactor(api): add flexible filtering options
Diffstat (limited to 'internal/gallery')
-rw-r--r--internal/gallery/query_filter.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/gallery/query_filter.go b/internal/gallery/query_filter.go
index 9e10758..dda73c4 100644
--- a/internal/gallery/query_filter.go
+++ b/internal/gallery/query_filter.go
@@ -18,7 +18,10 @@ func filterQueryPhotos(
for _, photo := range photos {
ext := strings.TrimPrefix(filepath.Ext(photo.RelativePath), ".")
- if strings.EqualFold(ext, query.Extension) {
+ if strings.EqualFold(
+ strings.TrimPrefix(ext, "."),
+ strings.TrimPrefix(query.Extension, "."),
+ ) {
filtered = append(filtered, photo)
}
}