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.
This commit is contained in:
2026-01-30 02:15:48 -05:00
parent 8d8c0892a2
commit 2bb754b245

View File

@@ -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)
{