add Jellyfin albumiterator

This commit is contained in:
Drew Weymouth
2023-11-14 09:05:02 -08:00
parent 08ca09d686
commit 8aed1e5234
6 changed files with 86 additions and 21 deletions
@@ -49,9 +49,11 @@ func (r *baseIter) Next() *mediaprovider.Album {
return nil
}
r.serverPos += len(albums)
albums = sharedutil.FilterSlice(albums, func(al *mediaprovider.Album) bool {
return filterMatches(r.filter, al)
})
if !r.filter.IsNil() {
albums = sharedutil.FilterSlice(albums, func(al *mediaprovider.Album) bool {
return filterMatches(r.filter, al)
})
}
r.prefetched = albums
if len(albums) > 0 {
break