implement caching for provider playlists to optimize API calls and improve performance

This commit is contained in:
Kamil
2024-12-10 15:44:03 +00:00
parent 4106524710
commit 6f3f5b9623
2 changed files with 8 additions and 5 deletions

View File

@@ -34,7 +34,10 @@ def jellyfin_playlists():
combined_playlists = []
for pl in playlists:
provider_playlist = provider_client.get_playlist(pl.provider_playlist_id)
# Use the cached provider_playlist_id to fetch the playlist from the provider
provider_playlist = functions.get_cached_provider_playlist(pl.provider_playlist_id,pl.provider_id)
#provider_playlist = provider_client.get_playlist(pl.provider_playlist_id)
# 4. Convert the playlists to CombinedPlaylistData
combined_data = functions.prepPlaylistData(provider_playlist)
if combined_data: