From dfd8ead9f858b29627f4c5c7dff861e12c785e11 Mon Sep 17 00:00:00 2001 From: echel0n Date: Wed, 30 Apr 2014 22:17:54 -0700 Subject: [PATCH] Fix for published_parsed errors --- sickbeard/providers/newznab.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sickbeard/providers/newznab.py b/sickbeard/providers/newznab.py index 68ae0be9..45cfadc1 100644 --- a/sickbeard/providers/newznab.py +++ b/sickbeard/providers/newznab.py @@ -226,13 +226,13 @@ class NewznabProvider(generic.NZBProvider): (title, url) = self._get_title_and_url(item) - if not item.published_parsed: - logger.log(u"Unable to figure out the date for entry " + title + ", skipping it") - continue - else: + if item.has_key('published_parsed') and item['published_parsed']: result_date = item.published_parsed if result_date: result_date = datetime.datetime(*result_date[0:6]) + else: + logger.log(u"Unable to figure out the date for entry " + title + ", skipping it") + continue if not search_date or result_date > search_date: search_result = classes.Proper(title, url, result_date)