From 86e81efc16ccfe90733585fb382cf036f056c96f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 9 Aug 2012 09:12:40 -0700 Subject: [PATCH] Progress bar shows 100% for 0/0 episodes aired New: Series progress bar will be filled for a new series with no unaired episodes. --- NzbDrone.Web/Views/Series/Index.cshtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NzbDrone.Web/Views/Series/Index.cshtml b/NzbDrone.Web/Views/Series/Index.cshtml index 6590e6af8..339e36da1 100644 --- a/NzbDrone.Web/Views/Series/Index.cshtml +++ b/NzbDrone.Web/Views/Series/Index.cshtml @@ -165,7 +165,9 @@ } }, //Next Airing { sWidth: '140px', "mDataProp": "Episodes", "bSortable": false, "fnRender": function (row) { - var progress = row.aData["EpisodeFileCount"] / row.aData["EpisodeCount"] * 100; + var progress = 100; + if (row.aData["EpisodeCount"] > 0) + progress = row.aData["EpisodeFileCount"] / row.aData["EpisodeCount"] * 100; var result = "
" + "" + row.aData["EpisodeFileCount"] + " / " + row.aData["EpisodeCount"] +"" +