From 47477eea26a28b4a5db87a16e0dd0d0a5d3f8213 Mon Sep 17 00:00:00 2001 From: evilhero Date: Tue, 19 Feb 2019 10:46:55 -0500 Subject: [PATCH] FIX: fix for DDL not performing timestamp comparison properly due to change --- mylar/search.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mylar/search.py b/mylar/search.py index c4ba1b91..d923395a 100755 --- a/mylar/search.py +++ b/mylar/search.py @@ -987,7 +987,7 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa logger.fdebug('date used is : %s' % stdate) postdate_int = None - if all([nzbprov == '32P', RSS == 'no']) or nzbprov == 'ddl': + if all([nzbprov == '32P', RSS == 'no']) or all([nzbprov == 'ddl', len(pubdate) == 10]): postdate_int = pubdate logger.fdebug('[%s] postdate_int: %s' % (nzbprov, postdate_int)) elif any([postdate_int is None, type(postdate_int) != int]) or not all([nzbprov == '32P', RSS == 'no']): @@ -1069,11 +1069,11 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa if digitaldate != '0000-00-00' and dateconv2.date() >= digconv2.date(): logger.fdebug('%s is after DIGITAL store date of %s' % (pubdate, digitaldate)) elif dateconv2.date() < issconv2.date(): - logger.fdebug('[CONV]pubdate: %s < storedate: %s' % (dateconv2.date(), issconv2.date())) + logger.fdebug('[CONV] pubdate: %s < storedate: %s' % (dateconv2.date(), issconv2.date())) logger.fdebug('%s is before store date of %s. Ignoring search result as this is not the right issue.' % (pubdate, stdate)) continue else: - logger.fdebug('%s is after store date of %s' % (pubdate, stdate)) + logger.fdebug('[CONV] %s is after store date of %s' % (pubdate, stdate)) except: #if the above fails, drop down to the integer compare method as a failsafe. if digitaldate != '0000-00-00' and postdate_int >= digitaldate_int: @@ -1083,9 +1083,8 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa logger.fdebug('%s is before store date of %s. Ignoring search result as this is not the right issue.' % (pubdate, stdate)) continue else: - logger.fdebug('%s is after store date of %s' % (pubdate, stdate)) + logger.fdebug('[INT] %s is after store date of %s' % (pubdate, stdate)) # -- end size constaints. - if '(digital first)' in ComicTitle.lower(): #entry['title'].lower(): dig_moving = re.sub('\(digital first\)', '', ComicTitle.lower()).strip() #entry['title'].lower()).strip() dig_moving = re.sub('[\s+]', ' ', dig_moving)