1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-04 15:12:23 -05:00

Merge pull request #1283 from abeloin/patch-proper_pubdate

Fix issues with newznab provider
This commit is contained in:
Alexandre Beloin 2015-02-15 18:24:09 -05:00
commit 509158cc70
2 changed files with 9 additions and 8 deletions

View File

@ -360,16 +360,16 @@ class NewznabProvider(generic.NZBProvider):
try:
result_date = datetime.datetime(*item['published_parsed'][0:6])
except AttributeError:
except (AttributeError, KeyError):
try:
result_date = datetime.datetime(*item['updated_parsed'][0:6])
except AttributeError:
except (AttributeError, KeyError):
try:
result_date = datetime.datetime(*item['created_parsed'][0:6])
except AttributeError:
except (AttributeError, KeyError):
try:
result_date = datetime.datetime(*item['date'][0:6])
except AttributeError:
except (AttributeError, KeyError):
logger.log(u"Unable to figure out the date for entry " + title + ", skipping it")
continue

View File

@ -242,6 +242,7 @@ def pickBestResult(results, show, quality_list=None):
logger.INFO)
continue
if hasattr(cur_result, 'size'):
if sickbeard.USE_FAILED_DOWNLOADS and failed_history.hasFailed(cur_result.name, cur_result.size,
cur_result.provider.name):
logger.log(cur_result.name + u" has previously failed, rejecting it")