diff --git a/allstarr/Controllers/JellyfinController.cs b/allstarr/Controllers/JellyfinController.cs index 4c43812..4b8c7f1 100644 --- a/allstarr/Controllers/JellyfinController.cs +++ b/allstarr/Controllers/JellyfinController.cs @@ -2843,21 +2843,22 @@ public class JellyfinController : ControllerBase externalMatchedCount = matchedTracks.Count(t => t.MatchedSong != null && !t.MatchedSong.IsLocal); } - // Total available tracks = what's actually in Jellyfin (local + external matched) - // This is what clients should see as the track count - var totalAvailableCount = localTracksCount; + // Total available tracks = local tracks in Jellyfin + external matched tracks + // This represents what users will actually hear when playing the playlist + var totalAvailableCount = localTracksCount + externalMatchedCount; if (totalAvailableCount > 0) { // Update ChildCount to show actual available tracks itemDict["ChildCount"] = totalAvailableCount; modified = true; - _logger.LogInformation("✓ Updated ChildCount for Spotify playlist {Name} to {Total} (actual tracks in Jellyfin)", - playlistName, totalAvailableCount); + _logger.LogInformation("✓ Updated ChildCount for Spotify playlist {Name} to {Total} ({Local} local + {External} external)", + playlistName, totalAvailableCount, localTracksCount, externalMatchedCount); } else { - _logger.LogWarning("No tracks found in Jellyfin for {Name}", playlistName); + _logger.LogWarning("No tracks found for {Name} ({Local} local + {External} external = {Total} total)", + playlistName, localTracksCount, externalMatchedCount, totalAvailableCount); } } }