mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user