mirror of
https://github.com/Radarr/Radarr
synced 2025-03-11 06:33:16 +00:00
Fixed: Sorting queue by columns
This commit is contained in:
parent
9df45199d0
commit
b8f1286abb
1 changed files with 20 additions and 1 deletions
|
@ -139,7 +139,26 @@ namespace Radarr.Api.V3.Queue
|
|||
public PagingResource<QueueResource> GetQueue([FromQuery] PagingRequestResource paging, bool includeUnknownMovieItems = false, bool includeMovie = false, [FromQuery] int[] movieIds = null, DownloadProtocol? protocol = null, [FromQuery] int[] languages = null, int? quality = null)
|
||||
{
|
||||
var pagingResource = new PagingResource<QueueResource>(paging);
|
||||
var pagingSpec = pagingResource.MapToPagingSpec<QueueResource, NzbDrone.Core.Queue.Queue>(null, "timeleft", SortDirection.Ascending);
|
||||
var pagingSpec = pagingResource.MapToPagingSpec<QueueResource, NzbDrone.Core.Queue.Queue>(
|
||||
new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
"timeleft",
|
||||
"status",
|
||||
"movies.sortTitle",
|
||||
"year",
|
||||
"languages",
|
||||
"quality",
|
||||
"protocol",
|
||||
"indexer",
|
||||
"downloadClient",
|
||||
"title",
|
||||
"size",
|
||||
"estimatedCompletionTime",
|
||||
"added",
|
||||
"progress"
|
||||
},
|
||||
"timeleft",
|
||||
SortDirection.Ascending);
|
||||
|
||||
return pagingSpec.ApplyToPage((spec) => GetQueue(spec, movieIds?.ToHashSet(), protocol, languages?.ToHashSet(), quality, includeUnknownMovieItems), (q) => MapToResource(q, includeMovie));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue