mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
fix(subsonic): change role filter logic
fix #4140 Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
b19d5f0d3e
commit
fa2cf36245
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user