From 749f7bcd91f551ece2d88bb6290f0d830a9bccfb Mon Sep 17 00:00:00 2001 From: Prinz23 Date: Thu, 31 Aug 2017 01:04:32 +0200 Subject: [PATCH] Change prevent showing 'Mark download as bad and retry?' dialog when status doesn't require it --- CHANGES.md | 1 + gui/slick/js/ajaxEpSearch.js | 2 +- sickbeard/webserve.py | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 1624c85d..ea16f609 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -106,6 +106,7 @@ * Add "Shows from defunct TV info sources" to Manage/Show Processes page to link shows that can be switched to a different default TV info source * Add shows not found at a TV info source for over 7 days will only be retried once a week +* Change prevent showing 'Mark download as bad and retry?' dialog when status doesn't require it [develop changelog] diff --git a/gui/slick/js/ajaxEpSearch.js b/gui/slick/js/ajaxEpSearch.js index d4502673..2c6ebea2 100644 --- a/gui/slick/js/ajaxEpSearch.js +++ b/gui/slick/js/ajaxEpSearch.js @@ -67,7 +67,7 @@ function updateImages(data) { //el=$('td#' + ep.season + 'x' + ep.episode + '.search img'); img.attr('title','Searching'); img.attr('alt','searching'); - img.parent().attr('class','epRetry'); + if (ep.retrystatus) {img.parent().attr('class','epRetry');} else {img.parent().attr('class','epSearch');} img.attr('src',sbRoot+'/images/' + searchImage); enableLink(el); diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 7d6491e2..de7537d5 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -2362,6 +2362,7 @@ class Home(MainHandler): 'status' : statusStrings[epObj.status], 'quality': self.getQualityClass(epObj)}) + retry_statues = [SNATCHED, SNATCHED_BEST, SNATCHED_PROPER, DOWNLOADED, ARCHIVED] if currentManualSearchThreadActive: searchThread = currentManualSearchThreadActive searchstatus = 'searching' @@ -2374,6 +2375,7 @@ class Home(MainHandler): 'episodeindexid': searchThread.segment.indexerid, 'season' : searchThread.segment.season, 'searchstatus' : searchstatus, + 'retrystatus': Quality.splitCompositeStatus(searchThread.segment.status)[0] in retry_statues, 'status' : statusStrings[searchThread.segment.status], 'quality': self.getQualityClass(searchThread.segment)}) elif hasattr(searchThread, 'segment'): @@ -2382,6 +2384,7 @@ class Home(MainHandler): 'episodeindexid': epObj.indexerid, 'season' : epObj.season, 'searchstatus' : searchstatus, + 'retrystatus': Quality.splitCompositeStatus(epObj.status)[0] in retry_statues, 'status' : statusStrings[epObj.status], 'quality': self.getQualityClass(epObj)}) @@ -2394,6 +2397,7 @@ class Home(MainHandler): 'episodeindexid': searchThread.segment.indexerid, 'season' : searchThread.segment.season, 'searchstatus' : searchstatus, + 'retrystatus': Quality.splitCompositeStatus(searchThread.segment.status)[0] in retry_statues, 'status' : statusStrings[searchThread.segment.status], 'quality': self.getQualityClass(searchThread.segment)}) ### These are only Failed Downloads/Retry SearchThreadItems.. lets loop through the segement/episodes @@ -2405,6 +2409,7 @@ class Home(MainHandler): 'episodeindexid': epObj.indexerid, 'season' : epObj.season, 'searchstatus' : searchstatus, + 'retrystatus': Quality.splitCompositeStatus(epObj.status)[0] in retry_statues, 'status' : statusStrings[epObj.status], 'quality': self.getQualityClass(epObj)})