diff --git a/mylar/PostProcessor.py b/mylar/PostProcessor.py index a9828c8b..c0046d95 100755 --- a/mylar/PostProcessor.py +++ b/mylar/PostProcessor.py @@ -252,18 +252,31 @@ class PostProcessor(object): #force it to use the Publication Date of the latest issue instead of the Latest Date (which could be anything) latestdate = myDB.select('SELECT IssueDate from issues WHERE ComicID=? order by ReleaseDate DESC', [wv['ComicID']]) if latestdate: - latestdate = latestdate[0][0] + tmplatestdate = latestdate[0][0] + if tmplatestdate[:4] != wv['LatestDate'][:4]: + if tmplatestdate[:4] > wv['LatestDate'][:4]: + latestdate = tmplatestdate + else: + latestdate = wv['LatestDate'] + else: + latestdate = tmplatestdate else: latestdate = wv['LatestDate'] - logger.fdebug('Latest Date set to :' + str(latestdate)) if latestdate == '0000-00-00' or latestdate == 'None' or latestdate is None: logger.fdebug('Forcing a refresh of series: ' + wv_comicname + ' as it appears to have incomplete issue dates.') updater.dbUpdate([wv_comicid]) logger.fdebug('Refresh complete for ' + wv_comicname + '. Rechecking issue dates for completion.') latestdate = myDB.select('SELECT IssueDate from issues WHERE ComicID=? order by ReleaseDate DESC', [wv['ComicID']]) if latestdate: - latestdate = latestdate[0][0] + tmplatestdate = latestdate[0][0] + if tmplatestdate[:4] != wv['LatestDate'][:4]: + if tmplatestdate[:4] > wv['LatestDate'][:4]: + latestdate = tmplatestdate + else: + latestdate = wv['LatestDate'] + else: + latestdate = tmplatestdate else: latestdate = wv['LatestDate'] diff --git a/mylar/filechecker.py b/mylar/filechecker.py index 1e8e5ef0..fb812c0a 100755 --- a/mylar/filechecker.py +++ b/mylar/filechecker.py @@ -919,8 +919,8 @@ def listFiles(dir, watchcomic, Publisher, AlternateSearch=None, manual=None, sar #set the issue/year threshold here. # 2013 - (24issues/12) = 2011. #minyear = int(comyear) - (int(issuetotal) / 12) - maxyear = manual['LatestDate'][:4] # yyyy-mm-dd + logger.fdebug('[FILECHECKER] Latest date: ' + str(maxyear)) #subnm defined at being of module. len_sm = len(subnm) diff --git a/mylar/helpers.py b/mylar/helpers.py index 1c470107..4818299d 100755 --- a/mylar/helpers.py +++ b/mylar/helpers.py @@ -1229,7 +1229,7 @@ def havetotals(refreshit=None): st_year = latestdate[:st_date] year = '20' + st_year latestdate = str(year) + '-' + str(st_remainder) - logger.fdebug('year set to: ' + latestdate) + #logger.fdebug('year set to: ' + latestdate) c_date = datetime.date(int(latestdate[:4]), int(latestdate[5:7]), 1) n_date = datetime.date.today() recentchk = (n_date - c_date).days