diff --git a/allstarr/Controllers/JellyfinController.cs b/allstarr/Controllers/JellyfinController.cs index 731b5d2..8cb5348 100644 --- a/allstarr/Controllers/JellyfinController.cs +++ b/allstarr/Controllers/JellyfinController.cs @@ -121,6 +121,13 @@ public class JellyfinController : ControllerBase return Unauthorized(new { error = "Authentication required" }); } + // Update Spotify playlist counts if enabled and response contains playlists + if (_spotifySettings.Enabled && browseResult.RootElement.TryGetProperty("Items", out var _)) + { + _logger.LogInformation("Browse result has Items, checking for Spotify playlists to update counts"); + browseResult = await UpdateSpotifyPlaylistCounts(browseResult); + } + var result = JsonSerializer.Deserialize(browseResult.RootElement.GetRawText()); if (_logger.IsEnabled(LogLevel.Debug)) {