diff options
| author | RanXom <saiyedshizain@gmail.com> | 2026-07-22 18:33:40 +0530 |
|---|---|---|
| committer | RanXom <saiyedshizain@gmail.com> | 2026-07-22 18:33:40 +0530 |
| commit | 816c1506b2ccf081a5792ce676bcad7a7d6841fc (patch) | |
| tree | fb2c18314d6d099771d25b4c56ce665634b733ca | |
| parent | 8fb30a66a81a1f7150ebe86ed091e7c1651233a1 (diff) | |
| download | galleryd-816c1506b2ccf081a5792ce676bcad7a7d6841fc.tar.xz galleryd-816c1506b2ccf081a5792ce676bcad7a7d6841fc.zip | |
refactor(api): add flexible filtering options
| -rw-r--r-- | internal/gallery/query_filter.go | 5 |
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) } } |