From 6ffa2a32779bcf5969f9c4ec8f7b9ea95d643de9 Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Sat, 31 Jan 2026 19:34:45 -0500 Subject: [PATCH] use hardcoded playlist names for Spotify sync --- allstarr/Controllers/JellyfinController.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/allstarr/Controllers/JellyfinController.cs b/allstarr/Controllers/JellyfinController.cs index 8ab1f68..6e5ce76 100644 --- a/allstarr/Controllers/JellyfinController.cs +++ b/allstarr/Controllers/JellyfinController.cs @@ -1993,13 +1993,21 @@ public class JellyfinController : ControllerBase var results = new Dictionary(); + // Hardcoded playlist names that match the Spotify Import plugin format + var playlistNames = new Dictionary + { + { "4383a46d8bcac3be2ef9385053ea18df", "Discover Weekly" }, + { "ba50e26c867ec9d57ab2f7bf24cfd6b0", "Release Radar" } + }; + foreach (var playlistId in _spotifySettings.PlaylistIds) { try { - // Get playlist name - var playlistInfo = await _proxyService.GetJsonAsync($"Items/{playlistId}", null, Request.Headers); - var playlistName = playlistInfo?.RootElement.GetProperty("Name").GetString() ?? playlistId; + // Use hardcoded name or fall back to ID + var playlistName = playlistNames.ContainsKey(playlistId) + ? playlistNames[playlistId] + : playlistId; _logger.LogInformation("Fetching missing tracks for {Playlist} (ID: {Id})", playlistName, playlistId);