|
|
@ -62,7 +62,7 @@ namespace Lidarr.Api.V1.Queue
|
|
|
|
ordered = ascending ? fullQueue.OrderBy(orderByFunc) : fullQueue.OrderByDescending(orderByFunc);
|
|
|
|
ordered = ascending ? fullQueue.OrderBy(orderByFunc) : fullQueue.OrderByDescending(orderByFunc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ordered = ordered.ThenByDescending(q => 100 - q.Sizeleft / q.Size * 100);
|
|
|
|
ordered = ordered.ThenByDescending(q => q.Size == 0 ? 0 : 100 - q.Sizeleft / q.Size * 100);
|
|
|
|
|
|
|
|
|
|
|
|
pagingSpec.Records = ordered.Skip((pagingSpec.Page - 1) * pagingSpec.PageSize).Take(pagingSpec.PageSize).ToList();
|
|
|
|
pagingSpec.Records = ordered.Skip((pagingSpec.Page - 1) * pagingSpec.PageSize).Take(pagingSpec.PageSize).ToList();
|
|
|
|
pagingSpec.TotalRecords = fullQueue.Count;
|
|
|
|
pagingSpec.TotalRecords = fullQueue.Count;
|
|
|
|