diff --git a/allstarr/Controllers/JellyfinController.cs b/allstarr/Controllers/JellyfinController.cs index 4dcb775..118120a 100644 --- a/allstarr/Controllers/JellyfinController.cs +++ b/allstarr/Controllers/JellyfinController.cs @@ -2744,7 +2744,7 @@ public class JellyfinController : ControllerBase var matchedTracksKey = $"spotify:matched:ordered:{playlistName}"; var matchedTracks = await _cache.GetAsync>(matchedTracksKey); - _logger.LogInformation("Cache lookup for {Key}: {Count} matched tracks", + _logger.LogDebug("Cache lookup for {Key}: {Count} matched tracks", matchedTracksKey, matchedTracks?.Count ?? 0); // Fallback to legacy cache format @@ -2759,7 +2759,22 @@ public class JellyfinController : ControllerBase Position = i, MatchedSong = s }).ToList(); - _logger.LogInformation("Loaded {Count} tracks from legacy cache", matchedTracks.Count); + _logger.LogDebug("Loaded {Count} tracks from legacy cache", matchedTracks.Count); + } + } + + // Try loading from file cache if Redis is empty + if (matchedTracks == null || matchedTracks.Count == 0) + { + var fileItems = await LoadPlaylistItemsFromFile(playlistName); + if (fileItems != null && fileItems.Count > 0) + { + _logger.LogInformation("💿 Loaded {Count} playlist items from file cache for count update", fileItems.Count); + // Use file cache count directly + itemDict["ChildCount"] = fileItems.Count; + modified = true; + updatedItems.Add(itemDict); + continue; } } diff --git a/allstarr/Services/Jellyfin/JellyfinResponseBuilder.cs b/allstarr/Services/Jellyfin/JellyfinResponseBuilder.cs index 24e2725..5d11014 100644 --- a/allstarr/Services/Jellyfin/JellyfinResponseBuilder.cs +++ b/allstarr/Services/Jellyfin/JellyfinResponseBuilder.cs @@ -319,7 +319,14 @@ public class JellyfinResponseBuilder ["Protocol"] = "File", ["SupportsDirectStream"] = true, ["SupportsTranscoding"] = true, - ["SupportsDirectPlay"] = true + ["SupportsDirectPlay"] = true, + ["IsRemote"] = false, + ["IsInfiniteStream"] = false, + ["RequiresOpening"] = false, + ["RequiresClosing"] = false, + ["RequiresLooping"] = false, + ["SupportsProbing"] = true, + ["ReadAtNativeFramerate"] = false } }; }