diff --git a/allstarr/Services/Spotify/SpotifyTrackMatchingService.cs b/allstarr/Services/Spotify/SpotifyTrackMatchingService.cs index 4828e92..700d682 100644 --- a/allstarr/Services/Spotify/SpotifyTrackMatchingService.cs +++ b/allstarr/Services/Spotify/SpotifyTrackMatchingService.cs @@ -241,19 +241,19 @@ public class SpotifyTrackMatchingService : BackgroundService // CRITICAL: Must include UserId parameter or Jellyfin returns empty results var userId = jellyfinSettings.UserId; var playlistItemsUrl = $"Playlists/{playlistConfig.JellyfinId}/Items"; + var queryParams = new Dictionary(); if (!string.IsNullOrEmpty(userId)) { - playlistItemsUrl += $"?UserId={userId}"; + queryParams["UserId"] = userId; } else { _logger.LogWarning("No UserId configured - may not be able to fetch existing playlist tracks for {Playlist}", playlistName); } - var (existingTracksResponse, _) = await proxyService.GetJsonAsync( + var (existingTracksResponse, _) = await proxyService.GetJsonAsyncInternal( playlistItemsUrl, - null, - null); + queryParams); if (existingTracksResponse != null && existingTracksResponse.RootElement.TryGetProperty("Items", out var items))