support library scoping on more Jellyfin browsing operations

This commit is contained in:
Drew Weymouth
2025-07-15 18:15:15 -07:00
parent f4e84d97ab
commit d73f7e0645
6 changed files with 27 additions and 17 deletions
+6 -3
View File
@@ -20,21 +20,24 @@ func (j *jellyfinMediaProvider) SearchAll(searchQuery string, maxResults int) ([
var genres []jellyfin.NameID
var playlists []*jellyfin.Playlist
var opts jellyfin.QueryOpts
opts.Paging.Limit = limit
opts.Filter.ParentID = j.currentLibraryID
wg.Add(1)
go func() {
albumResult, _ := j.client.Search(searchQuery, jellyfin.TypeAlbum, jellyfin.Paging{Limit: limit})
albumResult, _ := j.client.Search(searchQuery, jellyfin.TypeAlbum, opts)
albums = albumResult.Albums
wg.Done()
}()
wg.Add(1)
go func() {
artistResult, _ := j.client.Search(searchQuery, jellyfin.TypeArtist, jellyfin.Paging{Limit: limit})
artistResult, _ := j.client.Search(searchQuery, jellyfin.TypeArtist, opts)
artists = artistResult.Artists
wg.Done()
}()
wg.Add(1)
go func() {
songResult, _ := j.client.Search(searchQuery, jellyfin.TypeSong, jellyfin.Paging{Limit: limit})
songResult, _ := j.client.Search(searchQuery, jellyfin.TypeSong, opts)
songs = songResult.Songs
wg.Done()
}()