mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
Fix Artist filtering
This commit is contained in:
parent
779d4a1c85
commit
7819e834c8
2 changed files with 4 additions and 1 deletions
|
@ -84,7 +84,7 @@ func (r *artistRepository) GetAll(options ...model.QueryOptions) (model.Artists,
|
|||
}
|
||||
|
||||
func (r *artistRepository) toModels(dba []dbArtist) model.Artists {
|
||||
var res model.Artists
|
||||
res := model.Artists{}
|
||||
for i := range dba {
|
||||
a := dba[i]
|
||||
res = append(res, *r.toModel(&a))
|
||||
|
|
|
@ -21,6 +21,9 @@ func (r sqlRestful) parseRestFilters(options rest.QueryOptions) Sqlizer {
|
|||
}
|
||||
filters := And{}
|
||||
for f, v := range options.Filters {
|
||||
if v == "" {
|
||||
continue
|
||||
}
|
||||
if ff, ok := r.filterMappings[f]; ok {
|
||||
filters = append(filters, ff(f, v))
|
||||
} else if f == "id" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue