1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-28 02:37:40 +00:00

Fixed: Sorting by episodes on series overview and poster views

Fixes #2167
This commit is contained in:
Mark McDowall 2017-12-04 18:51:47 -08:00
parent 4399d272dc
commit 195a761c29
No known key found for this signature in database
GPG key ID: D4CEFA9A718052E0

View file

@ -94,8 +94,9 @@ var Collection = PageableCollection.extend({
percentOfEpisodes : {
sortValue : function(model, attr) {
var percentOfEpisodes = model.get(attr);
var episodeCount = model.get('episodeCount');
var episodeFileCount = model.get('episodeFileCount');
var percentOfEpisodes = episodeCount ? episodeFileCount / episodeCount * 100 : 100;
return percentOfEpisodes + episodeCount / 1000000;
}