The downloadArtistDiscography function automates the process of downloading multiple releases by an artist.
You specify a type to filter which releases to download:
'album''epSingle''live''compilation''all' (downloads all the above categories)
The function iterates through the artist's releases, uses the provided fetchMore callback to handle pagination (loading more results if has_more is true), and then calls createDownloadJob for every item found in the specified category.
await downloadArtistDiscography(
artistResults, // QobuzArtistResults
setArtistResults,
fetchMore,
'all', // type: 'album' | 'epSingle' | 'live' | 'compilation' | 'all'
setStatusBar,
settings,
toast,
ffmpegState,
country?
);