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
1 changed files with 2 additions and 1 deletions

View File

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