mirror of
https://github.com/navidrome/navidrome.git
synced 2025-08-10 00:52:20 +00:00
fix(subsonic): change role filter logic
fix #4140 Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user