Fix sorting queue items by size

This commit is contained in:
Bogdan 2023-06-18 14:56:08 +03:00
parent 80fccbbe89
commit 6de2f4b171
1 changed files with 2 additions and 0 deletions

View File

@ -184,6 +184,8 @@ namespace Lidarr.Api.V1.Queue
return q => q.Album?.ReleaseDate ?? DateTime.MinValue;
case "quality":
return q => q.Quality;
case "size":
return q => q.Size;
case "progress":
// Avoid exploding if a download's size is 0
return q => 100 - (q.Sizeleft / Math.Max(q.Size * 100, 1));