mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 05:24:43 +00:00
FIX: fix for .HU issue numbering not being accounted for / displayed due to invalid numeric
This commit is contained in:
parent
bcb2e0cc10
commit
b268351178
5 changed files with 15 additions and 4 deletions
|
@ -2067,6 +2067,9 @@ class PostProcessor(object):
|
|||
elif 'mu' in issuenum.lower() and issuenum[:1].isdigit():
|
||||
issuenum = re.sub("[^0-9]", "", issuenum)
|
||||
issue_except = '.MU'
|
||||
elif 'hu' in issuenum.lower() and issuenum[:1].isdigit():
|
||||
issuenum = re.sub("[^0-9]", "", issuenum)
|
||||
issue_except = '.HU'
|
||||
elif u'\xbd' in issuenum:
|
||||
issuenum = '0.5'
|
||||
elif u'\xbc' in issuenum:
|
||||
|
|
|
@ -408,7 +408,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', 'SUMMER', 'SPRING', 'FALL', 'WINTER')
|
||||
exceptions = ('NOW', 'AI', 'AU', 'X', 'A', 'B', 'C', 'INH', 'MU', 'HU', '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'}]
|
||||
|
|
|
@ -990,6 +990,12 @@ def issuedigits(issnum):
|
|||
int_issnum = (int(issnum[:-2]) * 1000) + ord('m') + ord('u')
|
||||
else:
|
||||
int_issnum = (int(issnum[:-3]) * 1000) + ord('m') + ord('u')
|
||||
elif 'hu' in issnum.lower():
|
||||
remdec = issnum.find('.') #find the decimal position.
|
||||
if remdec == -1:
|
||||
int_issnum = (int(issnum[:-2]) * 1000) + ord('h') + ord('u')
|
||||
else:
|
||||
int_issnum = (int(issnum[:-3]) * 1000) + ord('h') + ord('u')
|
||||
|
||||
except ValueError as e:
|
||||
logger.error('[' + issnum + '] Unable to properly determine the issue number. Error: %s', e)
|
||||
|
|
|
@ -1127,6 +1127,8 @@ def updateissuedata(comicid, comicname=None, issued=None, comicIssues=None, call
|
|||
int_issnum = (int(issnum[:-4]) * 1000) + ord('n') + ord('o') + ord('w')
|
||||
elif 'mu' in issnum.lower():
|
||||
int_issnum = (int(issnum[:-3]) * 1000) + ord('m') + ord('u')
|
||||
elif 'hu' in issnum.lower():
|
||||
int_issnum = (int(issnum[:-3]) * 1000) + ord('h') + ord('u')
|
||||
elif u'\xbd' in issnum:
|
||||
int_issnum = .5 * 1000
|
||||
logger.fdebug('1/2 issue detected :' + issnum + ' === ' + str(int_issnum))
|
||||
|
|
|
@ -1695,7 +1695,7 @@ class WebInterface(object):
|
|||
try:
|
||||
x = float(weekly['ISSUE'])
|
||||
except ValueError, e:
|
||||
if 'au' in weekly['ISSUE'].lower() or 'ai' in weekly['ISSUE'].lower() or '.inh' in weekly['ISSUE'].lower() or '.now' in weekly['ISSUE'].lower() or '.mu' in weekly['ISSUE'].lower():
|
||||
if 'au' in weekly['ISSUE'].lower() or 'ai' in weekly['ISSUE'].lower() or '.inh' in weekly['ISSUE'].lower() or '.now' in weekly['ISSUE'].lower() or '.mu' in weekly['ISSUE'].lower() or '.hu' in weekly['ISSUE'].lower():
|
||||
x = weekly['ISSUE']
|
||||
|
||||
if x is not None:
|
||||
|
@ -1838,7 +1838,7 @@ class WebInterface(object):
|
|||
try:
|
||||
x = float(future['ISSUE'])
|
||||
except ValueError, e:
|
||||
if 'au' in future['ISSUE'].lower() or 'ai' in future['ISSUE'].lower() or '.inh' in future['ISSUE'].lower() or '.now' in future['ISSUE'].lower() or '.mu' in future['ISSUE'].lower():
|
||||
if 'au' in future['ISSUE'].lower() or 'ai' in future['ISSUE'].lower() or '.inh' in future['ISSUE'].lower() or '.now' in future['ISSUE'].lower() or '.mu' in future['ISSUE'].lower() or '.hu' in future['ISSUE'].lower():
|
||||
x = future['ISSUE']
|
||||
|
||||
if future['EXTRA'] == 'N/A' or future['EXTRA'] == '':
|
||||
|
@ -5953,7 +5953,7 @@ class WebInterface(object):
|
|||
try:
|
||||
x = float(weekly['ISSUE'])
|
||||
except ValueError, e:
|
||||
if 'au' in weekly['ISSUE'].lower() or 'ai' in weekly['ISSUE'].lower() or '.inh' in weekly['ISSUE'].lower() or '.now' in weekly['ISSUE'].lower() or '.mu' in weekly['ISSUE'].lower():
|
||||
if 'au' in weekly['ISSUE'].lower() or 'ai' in weekly['ISSUE'].lower() or '.inh' in weekly['ISSUE'].lower() or '.now' in weekly['ISSUE'].lower() or '.mu' in weekly['ISSUE'].lower() or '.hu' in weekly['ISSUE'].lower():
|
||||
x = weekly['ISSUE']
|
||||
|
||||
if x is not None:
|
||||
|
|
Loading…
Reference in a new issue