v1.2.2: Fix critical metadata loss in Spotify playlist proxy

CRITICAL FIX: Spotify playlist tracks were missing Genres, People, ProviderIds,
ParentId, Tags, DateCreated, and SortName fields because the proxy was only
requesting Fields=MediaSources from Jellyfin instead of passing through all
requested fields from the client.

This caused Jellyfin clients to display incomplete metadata (empty genre columns,
missing composer info, etc.) when viewing Spotify-synced playlists through allstarr.

Changes:
- Modified GetSpotifyPlaylistTracksOrderedAsync to pass through all Fields
  parameters from the original client request instead of hardcoding MediaSources
- Now preserves all metadata fields that Jellyfin provides for local tracks
- Fixes genre display, composer info, and other metadata in playlist views

Impact: All Spotify playlist tracks now show complete metadata matching direct
Jellyfin behavior.
This commit is contained in:
2026-02-10 10:59:57 -05:00
parent ea4a533c24
commit c40adc4465
2 changed files with 14 additions and 5 deletions

View File

@@ -3529,8 +3529,17 @@ public class JellyfinController : ControllerBase
return null; // Fall back to legacy mode return null; // Fall back to legacy mode
} }
// Request MediaSources field to get bitrate info // Pass through all requested fields from the original request
var playlistItemsUrl = $"Playlists/{playlistId}/Items?UserId={userId}&Fields=MediaSources"; var queryString = Request.QueryString.Value ?? "";
var playlistItemsUrl = $"Playlists/{playlistId}/Items?UserId={userId}";
// Append the original query string (which includes Fields parameter)
if (!string.IsNullOrEmpty(queryString))
{
// Remove the leading ? if present
queryString = queryString.TrimStart('?');
playlistItemsUrl = $"{playlistItemsUrl}&{queryString}";
}
_logger.LogInformation("🔍 Fetching existing tracks from Jellyfin playlist {PlaylistId} with UserId {UserId}", _logger.LogInformation("🔍 Fetching existing tracks from Jellyfin playlist {PlaylistId} with UserId {UserId}",
playlistId, userId); playlistId, userId);

View File

@@ -5,9 +5,9 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>allstarr</RootNamespace> <RootNamespace>allstarr</RootNamespace>
<Version>1.0.0</Version> <Version>1.2.2</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion> <AssemblyVersion>1.2.2.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion> <FileVersion>1.2.2.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>