From 59f4f44edbe094c3d6fac308f387a80263b9cbf2 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Thu, 30 Oct 2014 12:32:30 +0000 Subject: [PATCH] Fix the home page from failing to load if a show status contains nothing. --- CHANGES.md | 19 +++++++------ gui/slick/interfaces/default/home.tmpl | 38 +++++++++++++++----------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index eb34bc8c..d09503e5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -26,17 +26,18 @@ * Fix Layout "Poster" sort of Paused, Ended, and Continuing shows as they were random * Fix Layout "Simple" sort of tvrage "New" and "Returning" series by changing status column text to "Continuing" * Add dark spinner to "Add New Show" (searching indexers), "Add existing shows" (Loading Folders), Coming Eps and all config pages (when saving) -* Changed notifier test buttons to not run if required field is missing -* Required fields will now highlight input box and add an icon if field is missing when test is pushed -* Changed Test Plex Media Server to Test Plex Client as it only tests the client and not the server -* Styled config_notifications to match new config_general styling -* Styled config_providers to match new config_general styling -* Removed qtip from providers and converted back to a tab -* Removed superfish-1.4.8.js and supersubs-0.2b.js as they no longer break provider sorting with qtip removed and is no longer required due to new UI +* Change notifier test buttons to not run if required field is missing +* Require fields will now highlight input box and add an icon if field is missing when test is pushed +* Change Test Plex Media Server to Test Plex Client as it only tests the client and not the server +* Style config_notifications to match new config_general styling +* Style config_providers to match new config_general styling +* Remove qtip from providers and converted back to a tab +* Remove superfish-1.4.8.js and supersubs-0.2b.js as they no longer break provider sorting with qtip removed and is no longer required due to new UI * Overhaul Config Search Settings in line with General Configuration -* Fixes errors occurring when a show folder is deleted outside of SickRage -* Added confirmation dialogs back in that were missed due to new UI changes +* Fix errors occurring when a show folder is deleted outside of SickRage +* Add confirmation dialogs back in that were missed due to new UI changes * Combined delete and remove buttons in to one on individual show pages +* Fix the home page from failing to load if a show status contains nothing ### 0.2.1 (2014-10-22 06:41:00 UTC) diff --git a/gui/slick/interfaces/default/home.tmpl b/gui/slick/interfaces/default/home.tmpl index d20feb16..83f465f5 100644 --- a/gui/slick/interfaces/default/home.tmpl +++ b/gui/slick/interfaces/default/home.tmpl @@ -280,9 +280,9 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name)) #set $cur_downloaded = 0 #set $cur_total = 0 #set $download_stat_tip = '' - #if re.search(r'(?i)(?:new|returning)\s*series', $curShow.status): + #if None is not $curShow.status and re.search(r'(?i)(?:new|returning)\s*series', $curShow.status) #set $display_status = 'Continuing' - #else: + #else #set $display_status = $curShow.status #end if @@ -329,13 +329,15 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name)) #if $cur_airs_next: #set $data_date = $time.mktime($network_timezones.parse_date_time($cur_airs_next,$curShow.airs,$curShow.network).timetuple()) -#else if 'nded' not in $display_status and 1 == int($curShow.paused): - #set $data_date = '5000000500.0' -#else if 'ontinu' in $display_status: - #set $data_date = '5000000000.0' -#else if 'nded' in $display_status: - #set $data_date = '5000000100.0' -#else: +#else if None is not $display_status + #if 'nded' not in $display_status and 1 == int($curShow.paused) + #set $data_date = '5000000500.0' + #else if 'ontinu' in $display_status + #set $data_date = '5000000000.0' + #else if 'nded' in $display_status + #set $data_date = '5000000100.0' + #end if +#else #set $data_date = '6000000000.0' #end if
@@ -373,14 +375,18 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
#if $cur_airs_next -#set $ldatetime = $network_timezones.parse_date_time($cur_airs_next,$curShow.airs,$curShow.network) + #set $ldatetime = $network_timezones.parse_date_time($cur_airs_next,$curShow.airs,$curShow.network) $sbdatetime.sbdatetime.sbfdate($ldatetime) -#else if 'nded' not in $display_status and 1 == int($curShow.paused): - Paused -#else if $display_status: - $display_status #else - ? + #set $output_html = '?' + #if None is not $display_status + #if 'nded' not in $display_status and 1 == int($curShow.paused) + #set $output_html = 'Paused' + #else if $display_status + #set $output_html = $display_status + #end if + #end if + $output_html #end if
@@ -599,7 +605,7 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name)) -#if re.search(r'(?i)(?:new|returning)\s*series', $curShow.status): +#if None is not $curShow.status and re.search(r'(?i)(?:new|returning)\s*series', $curShow.status) Continuing #else: $curShow.status