mirror of
https://github.com/evilhero/mylar
synced 2025-03-15 08:18:44 +00:00
FIX: fix for filechecker not correctly parsing issues that contained a numeric and a unicode character (ie. 1½), FIX: Fix for improper adding of strings when annuals were being checked
This commit is contained in:
parent
52ea6e3d26
commit
c1b66df0b8
3 changed files with 17 additions and 6 deletions
|
@ -1060,11 +1060,19 @@ class FileChecker(object):
|
|||
#check for annual in title(s) here.
|
||||
if not self.justparse and all([mylar.CONFIG.ANNUALS_ON, 'annual' not in self.watchcomic.lower(), 'special' not in self.watchcomic.lower()]):
|
||||
if 'annual' in series_name.lower():
|
||||
issue_number = 'Annual ' + str(issue_number)
|
||||
isn = 'Annual'
|
||||
if issue_number is not None:
|
||||
issue_number = '%s %s' % (isn, issue_number)
|
||||
else:
|
||||
issue_number = isn
|
||||
series_name = re.sub('annual', '', series_name, flags=re.I).strip()
|
||||
series_name_decoded = re.sub('annual', '', series_name_decoded, flags=re.I).strip()
|
||||
elif 'special' in series_name.lower():
|
||||
issue_number = 'Special ' + str(issue_number)
|
||||
isn = 'Special'
|
||||
if issue_number is not None:
|
||||
issue_number = '%s %s' % (isn, issue_number)
|
||||
else:
|
||||
issue_number = isn
|
||||
series_name = re.sub('special', '', series_name, flags=re.I).strip()
|
||||
series_name_decoded = re.sub('special', '', series_name_decoded, flags=re.I).strip()
|
||||
|
||||
|
|
|
@ -1025,8 +1025,7 @@ def issuedigits(issnum):
|
|||
x = [vals[key] for key in vals if key in issnum]
|
||||
|
||||
if x:
|
||||
#logger.fdebug('Unicode Issue present - adjusting.')
|
||||
int_issnum = x[0] * 1000
|
||||
int_issnum = (int(re.sub('[^0-9]', '', issnum).strip()) + x[0]) * 1000
|
||||
#logger.fdebug('int_issnum: ' + str(int_issnum))
|
||||
else:
|
||||
if any(['.' in issnum, ',' in issnum]):
|
||||
|
|
|
@ -58,7 +58,7 @@ def addComictoDB(comicid, mismatch=None, pullupd=None, imported=None, ogcname=No
|
|||
if dbcomic is None:
|
||||
newValueDict = {"ComicName": "Comic ID: %s" % (comicid),
|
||||
"Status": "Loading"}
|
||||
if all([imported, mylar.CONFIG.IMP_PATHS is True]):
|
||||
if all([imported is not None, mylar.CONFIG.IMP_PATHS is True]):
|
||||
comlocation = os.path.dirname(imported['filelisting'][0]['comiclocation'])
|
||||
else:
|
||||
comlocation = None
|
||||
|
@ -1130,6 +1130,10 @@ def updateissuedata(comicid, comicname=None, issued=None, comicIssues=None, call
|
|||
elif 'hu' in issnum.lower():
|
||||
int_issnum = (int(issnum[:-3]) * 1000) + ord('h') + ord('u')
|
||||
elif u'\xbd' in issnum:
|
||||
tmpiss = re.sub('[^0-9]', '', issnum).strip()
|
||||
if len(tmpiss) > 0:
|
||||
int_issnum = (int(tmpiss) + .5) * 1000
|
||||
else:
|
||||
int_issnum = .5 * 1000
|
||||
logger.fdebug('1/2 issue detected :' + issnum + ' === ' + str(int_issnum))
|
||||
elif u'\xbc' in issnum:
|
||||
|
|
Loading…
Add table
Reference in a new issue