Fixed: Add queue size check to sort to fix #219 (#223)

This commit is contained in:
Daniel Underwood 2018-03-06 15:04:06 -05:00 committed by GitHub
parent df15dbe462
commit 71a0c62fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ namespace Lidarr.Api.V1.Queue
case "quality":
return q => q.Quality;
case "progress":
return q => 100 - q.Sizeleft / q.Size * 100;
return q => q.Size == 0 ? 0 : 100 - q.Sizeleft / q.Size * 100;
default:
return q => q.Timeleft;
}