diff --git a/mylar/filechecker.py b/mylar/filechecker.py index eb373d06..88f00962 100755 --- a/mylar/filechecker.py +++ b/mylar/filechecker.py @@ -390,7 +390,7 @@ class FileChecker(object): lastmod_position = 0 booktype = 'issue' #exceptions that are considered alpha-numeric issue numbers - exceptions = ('NOW', 'AI', 'AU', 'X', 'A', 'B', 'C', 'INH', 'MU') + exceptions = ('NOW', 'AI', 'AU', 'X', 'A', 'B', 'C', 'INH', 'MU', 'SUMMER', 'SPRING', 'FALL', 'WINTER') #unicode characters, followed by int value # num_exceptions = [{iss:u'\xbd',val:.5},{iss:u'\xbc',val:.25}, {iss:u'\xe',val:.75}, {iss:u'\221e',val:'infinity'}] @@ -444,7 +444,14 @@ class FileChecker(object): 'position': split_file.index(sf), 'mod_position': self.char_file_position(modfilename, sf, lastmod_position), 'validcountchk': validcountchk}) - + else: + test_position = modfilename[self.char_file_position(modfilename, sf,lastmod_position)-1] + if test_position == '#': + possible_issuenumbers.append({'number': sf, + 'position': split_file.index(sf), + 'mod_position': self.char_file_position(modfilename, sf, lastmod_position), + 'validcountchk': validcountchk}) + if sf == 'XCV': # new 2016-09-19 \ attempt to check for XCV which replaces any unicode above for x in list(wrds): diff --git a/mylar/helpers.py b/mylar/helpers.py index 17223ff2..852421ca 100755 --- a/mylar/helpers.py +++ b/mylar/helpers.py @@ -1092,8 +1092,16 @@ def issuedigits(issnum): a+=1 int_issnum = (int(issno) * 1000) + ordtot elif invchk == "true": - logger.fdebug('this does not have an issue # that I can parse properly.') - return 999999999999999 + if any([issnum.lower() == 'fall', issnum.lower() == 'spring', issnum.lower() == 'summer', issnum.lower() == 'winter']): + inu = 0 + ordtot = 0 + while (inu < len(issnum)): + ordtot += ord(issnum[inu].lower()) #lower-case the letters for simplicty + inu+=1 + int_issnum = ordtot + else: + logger.fdebug('this does not have an issue # that I can parse properly.') + return 999999999999999 else: if issnum == '9-5': issnum = u'9\xbd' diff --git a/mylar/importer.py b/mylar/importer.py index e6717b1e..bdbfcaa4 100644 --- a/mylar/importer.py +++ b/mylar/importer.py @@ -1195,8 +1195,17 @@ def updateissuedata(comicid, comicname=None, issued=None, comicIssues=None, call a+=1 int_issnum = (int(issno) * 1000) + ordtot elif invchk == "true": - logger.fdebug('this does not have an issue # that I can parse properly.') - return + if any([issnum.lower() == 'fall 2005', issnum.lower() == 'spring 2005', issnum.lower() == 'summer 2006', issnum.lower() == 'winter 2009']): + issnum = re.sub('[0-9]+', '', issnum).strip() + inu = 0 + ordtot = 0 + while (inu < len(issnum)): + ordtot += ord(issnum[inu].lower()) #lower-case the letters for simplicty + inu+=1 + int_issnum = ordtot + else: + logger.fdebug('this does not have an issue # that I can parse properly.') + return else: if int_issnum is not None: pass diff --git a/mylar/updater.py b/mylar/updater.py index d63c7c22..cd88e380 100755 --- a/mylar/updater.py +++ b/mylar/updater.py @@ -1119,6 +1119,7 @@ def forceRescan(ComicID, archive=None, module=None, recheck=False): while True: try: reiss = reissues[n] + int_iss = None except IndexError: break int_iss = helpers.issuedigits(reiss['Issue_Number'])