1
0
mirror of https://github.com/moparisthebest/SickRage synced 2025-01-06 03:18:01 -05:00

Fix for issue #971 and issue #1007 - defaults to a status of UNKNOWN if a empty result is returned

This commit is contained in:
echel0n 2014-12-02 03:21:23 -08:00
parent 44396490cd
commit 33e094a9aa
4 changed files with 5 additions and 5 deletions

View File

@ -339,7 +339,7 @@ def wantedEpisodes(show, fromDate):
# check through the list of statuses to see if we want any # check through the list of statuses to see if we want any
wanted = [] wanted = []
for result in sqlResults: for result in sqlResults:
curCompositeStatus = int(result["status"]) curCompositeStatus = int(result["status"] or -1)
curStatus, curQuality = common.Quality.splitCompositeStatus(curCompositeStatus) curStatus, curQuality = common.Quality.splitCompositeStatus(curCompositeStatus)
if bestQualities: if bestQualities:

View File

@ -152,7 +152,7 @@ class BacklogSearcher:
# check through the list of statuses to see if we want any # check through the list of statuses to see if we want any
wanted = {} wanted = {}
for result in sqlResults: for result in sqlResults:
curCompositeStatus = int(result["status"]) curCompositeStatus = int(result["status"] or -1)
curStatus, curQuality = common.Quality.splitCompositeStatus(curCompositeStatus) curStatus, curQuality = common.Quality.splitCompositeStatus(curCompositeStatus)
if bestQualities: if bestQualities:

View File

@ -1309,7 +1309,7 @@ class CMD_Backlog(ApiCall):
for curResult in sqlResults: for curResult in sqlResults:
curEpCat = curShow.getOverview(int(curResult["status"])) curEpCat = curShow.getOverview(int(curResult["status"] or -1))
if curEpCat and curEpCat in (Overview.WANTED, Overview.QUAL): if curEpCat and curEpCat in (Overview.WANTED, Overview.QUAL):
showEps.append(curResult) showEps.append(curResult)

View File

@ -940,7 +940,7 @@ class Manage(MainHandler):
[curShow.indexerid]) [curShow.indexerid])
for curResult in sqlResults: for curResult in sqlResults:
curEpCat = curShow.getOverview(int(curResult["status"])) curEpCat = curShow.getOverview(int(curResult["status"] or -1))
if curEpCat: if curEpCat:
epCats[str(curResult["season"]) + "x" + str(curResult["episode"])] = curEpCat epCats[str(curResult["season"]) + "x" + str(curResult["episode"])] = curEpCat
epCounts[curEpCat] += 1 epCounts[curEpCat] += 1
@ -3784,7 +3784,7 @@ class Home(MainHandler):
epCounts[Overview.SNATCHED] = 0 epCounts[Overview.SNATCHED] = 0
for curResult in sqlResults: for curResult in sqlResults:
curEpCat = showObj.getOverview(int(curResult["status"])) curEpCat = showObj.getOverview(int(curResult["status"] or -1))
if curEpCat: if curEpCat:
epCats[str(curResult["season"]) + "x" + str(curResult["episode"])] = curEpCat epCats[str(curResult["season"]) + "x" + str(curResult["episode"])] = curEpCat
epCounts[curEpCat] += 1 epCounts[curEpCat] += 1