From 2bb754b245e2059f61e73d52028b59b80609b2ef Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Fri, 30 Jan 2026 02:15:48 -0500 Subject: [PATCH] Fix: Pass through full query string for browse requests Recently added, recently played, and frequently played sections use different query parameters (SortBy, SortOrder, Filters, etc) that we weren't forwarding. Now we pass the complete query string to Jellyfin. --- allstarr/Controllers/JellyfinController.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/allstarr/Controllers/JellyfinController.cs b/allstarr/Controllers/JellyfinController.cs index c0b68d3..058a5c7 100644 --- a/allstarr/Controllers/JellyfinController.cs +++ b/allstarr/Controllers/JellyfinController.cs @@ -97,15 +97,16 @@ public class JellyfinController : ControllerBase // If Jellyfin returns empty results, we'll just return empty (not mixing browse with external) if (string.IsNullOrWhiteSpace(searchTerm) && string.IsNullOrWhiteSpace(parentId)) { - _logger.LogDebug("No search term or parentId, proxying to Jellyfin with artistIds={ArtistIds}", artistIds); - var browseResult = await _proxyService.GetItemsAsync( - parentId: null, - includeItemTypes: ParseItemTypes(includeItemTypes), - sortBy: sortBy, - limit: limit, - startIndex: startIndex, - artistIds: artistIds, - clientHeaders: Request.Headers); + _logger.LogDebug("No search term or parentId, proxying to Jellyfin with full query string"); + + // Build the full endpoint path with query string + var endpoint = userId != null ? $"Users/{userId}/Items" : "Items"; + if (Request.QueryString.HasValue) + { + endpoint = $"{endpoint}{Request.QueryString.Value}"; + } + + var browseResult = await _proxyService.GetJsonAsync(endpoint, null, Request.Headers); if (browseResult == null) {