fix: add route to intercept playlist items requests

- Add GetPlaylistItems route with Order=5 (before catch-all)
- Intercepts /playlists/{id}/items requests
- Routes to GetPlaylistTracks for Spotify playlist handling
This commit is contained in:
2026-01-31 16:54:01 -05:00
parent 2b078453b2
commit c117fa41f6

View File

@@ -1640,6 +1640,16 @@ public class JellyfinController : ControllerBase
return await ProxyRequest("web/index.html");
}
/// <summary>
/// Intercepts playlist items requests to inject Spotify playlist tracks.
/// </summary>
[HttpGet("Playlists/{playlistId}/Items", Order = 5)]
[HttpGet("playlists/{playlistId}/items", Order = 5)]
public async Task<IActionResult> GetPlaylistItems(string playlistId)
{
return await GetPlaylistTracks(playlistId);
}
/// <summary>
/// Catch-all endpoint that proxies unhandled requests to Jellyfin transparently.
/// This route has the lowest priority and should only match requests that don't have SearchTerm.