mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-09 23:55:10 -05:00
Fix Spotify playlist ChildCount in SearchItems endpoint
The playlist list was going through SearchItems (not ProxyRequest), so UpdateSpotifyPlaylistCounts was never called. Now updates counts in both: - SearchItems when browsing playlists (no search term) - ProxyRequest for other playlist list requests This fixes playlists showing 0 tracks when they should show the count of missing tracks available.
This commit is contained in:
@@ -121,6 +121,13 @@ public class JellyfinController : ControllerBase
|
|||||||
return Unauthorized(new { error = "Authentication required" });
|
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<object>(browseResult.RootElement.GetRawText());
|
var result = JsonSerializer.Deserialize<object>(browseResult.RootElement.GetRawText());
|
||||||
if (_logger.IsEnabled(LogLevel.Debug))
|
if (_logger.IsEnabled(LogLevel.Debug))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user