Parallelize Recommendation creation in Subsonic provider (#2254)
authorEric Munson <eric@munsonfam.org>
Wed, 2 Jul 2025 15:48:24 +0000 (11:48 -0400)
committerGitHub <noreply@github.com>
Wed, 2 Jul 2025 15:48:24 +0000 (11:48 -0400)
commit5307b3abbcfa62b397edfca0a864260cde3ca3da
treed996471d0545ed03944da0837985845d1032e1dd
parent3aa5d529abd9bb73c1d93d62d7d3a5528a83fc12
Parallelize Recommendation creation in Subsonic provider (#2254)

* Add Open Subsonic Cache category

We will be using this initially for podcast channels as they are slow to
look up for larger podcasts. This category, and caching in general
should be used across the provider (at a later date).

Signed-off-by: Eric B Munson <eric@munsonfam.org>
* Feat: Subsonic: Parallelize Recommendation creation

When all the recommendations are enabled the main page is rather slow to
load. Split each kind into a helper function and invoke each helper that
is enabled in parallel.

The newest podcast episode recommendation was the worst offender due to
the number of API calls for getting podcast channels. This was broken
into an initial pass over episodes to collect a set of channel ids, then
a parallel retrieval of the unique channel ids.

Signed-off-by: Eric B Munson <eric@munsonfam.org>
music_assistant/constants.py
music_assistant/providers/opensubsonic/sonic_provider.py