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"}
|
options := model.QueryOptions{Sort: "name"}
|
||||||
if len(roles) > 0 {
|
if len(roles) > 0 {
|
||||||
roleFilters := slice.Map(roles, func(r model.Role) Sqlizer {
|
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 !includeMissing {
|
||||||
if options.Filters == nil {
|
if options.Filters == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user