From d20afa05150e3ddd10d306575d5eb7ba4e943516 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Tue, 17 Mar 2015 18:58:19 +0000 Subject: [PATCH] Change the episodes downloaded stat to display e.g. 2843 / 2844 as 99.9% instead of rounding to 100%. --- CHANGES.md | 1 + gui/slick/interfaces/default/inc_bottom.tmpl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 691862b7..8e8c47eb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -56,6 +56,7 @@ config/Post Processing/File Handling * Remove redundant "Skip remove detection" from the config/Post Processing/File Handling page * Change to highlight the current selected item in combos on page config/Post Processing +* Change the episodes downloaded stat to display e.g. 2843 / 2844 as 99.9% instead of rounding to 100% [develop changelog] * Fix traceback error when using the menu item Manage/Update Kodi diff --git a/gui/slick/interfaces/default/inc_bottom.tmpl b/gui/slick/interfaces/default/inc_bottom.tmpl index 693f57ad..b2d0d809 100644 --- a/gui/slick/interfaces/default/inc_bottom.tmpl +++ b/gui/slick/interfaces/default/inc_bottom.tmpl @@ -1,5 +1,6 @@ #import sickbeard #import datetime +#import re #from sickbeard import db, sbdatetime #from sickbeard.common import * @@ -37,7 +38,7 @@ #set $ep_downloaded = 0 #set $ep_total = 0 #end if -#set $ep_percentage = '' if $ep_total == 0 else '({:.1%})'.format(float($ep_downloaded)/float($ep_total)) +#set $ep_percentage = '' if $ep_total == 0 else '(%s%%)' % re.sub(r'(\d+)(\.\d)\d+', r'\1\2', str((float($ep_downloaded)/float($ep_total))*100)) #try #set $localRoot = $sbRoot