fix(subsonic): change role filter logic

fix #4140

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan
2025-05-29 14:52:49 -04:00
parent b19d5f0d3e
commit fa2cf36245

View File

@@ -212,9 +212,9 @@ func (r *artistRepository) GetIndex(includeMissing bool, roles ...model.Role) (m
options := model.QueryOptions{Sort: "name"}
if len(roles) > 0 {
roleFilters := slice.Map(roles, func(r model.Role) Sqlizer {
return roleFilter("role", r)
return roleFilter("role", r.String())
})
options.Filters = And(roleFilters)
options.Filters = Or(roleFilters)
}
if !includeMissing {
if options.Filters == nil {