1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fix for failed releases not properly converting scene numbered to indexer numbering plus small typo fix.

This commit is contained in:
echel0n 2014-05-19 08:47:01 -07:00
parent 2a5598ba0f
commit 51540993be
2 changed files with 3 additions and 5 deletions

View File

@ -75,6 +75,7 @@ class FailedProcessor(object):
logger.WARNING) logger.WARNING)
raise exceptions.FailedProcessingFailed() raise exceptions.FailedProcessingFailed()
parsed = parsed.convert(self._show_obj)
segment = {parsed.season_number:[]} segment = {parsed.season_number:[]}
for episode in parsed.episode_numbers: for episode in parsed.episode_numbers:
epObj = self._show_obj.getEpisode(parsed.season_number, episode) epObj = self._show_obj.getEpisode(parsed.season_number, episode)

View File

@ -55,9 +55,7 @@ def logFailed(release):
if len(sql_results) == 0: if len(sql_results) == 0:
logger.log( logger.log(
u"Release not found in snatch history. Recording it as bad with no size and no proivder.", logger.WARNING) u"Release not found in snatch history.", logger.WARNING)
logger.log(
u"Future releases of the same name from providers that don't return size will be skipped.", logger.WARNING)
elif len(sql_results) > 1: elif len(sql_results) > 1:
logger.log(u"Multiple logged snatches found for release", logger.WARNING) logger.log(u"Multiple logged snatches found for release", logger.WARNING)
sizes = len(set(x["size"] for x in sql_results)) sizes = len(set(x["size"] for x in sql_results))
@ -109,11 +107,10 @@ def hasFailed(release, size, provider="%"):
myDB = db.DBConnection("failed.db") myDB = db.DBConnection("failed.db")
sql_results = myDB.select( sql_results = myDB.select(
"SELECT * FROM failed WHERE release=? AND size=? AND provider LIKE ?", "SELECT * FROM failed WHERE release=? AND size=? AND provider LIKE ?",
[prepareFailedName(release), size, provider]) [release, size, provider])
return (len(sql_results) > 0) return (len(sql_results) > 0)
def revertEpisode(epObj): def revertEpisode(epObj):
"""Restore the episodes of a failed download to their original state""" """Restore the episodes of a failed download to their original state"""
myDB = db.DBConnection("failed.db") myDB = db.DBConnection("failed.db")