From 195a761c2976b73f243c190c153eacd8444e95ac Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 4 Dec 2017 18:51:47 -0800 Subject: [PATCH] Fixed: Sorting by episodes on series overview and poster views Fixes #2167 --- src/UI/Series/SeriesCollection.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UI/Series/SeriesCollection.js b/src/UI/Series/SeriesCollection.js index bef8fe338..42e23fd5e 100644 --- a/src/UI/Series/SeriesCollection.js +++ b/src/UI/Series/SeriesCollection.js @@ -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; }