mirror of
https://github.com/evilhero/mylar
synced 2024-12-27 01:57:01 +00:00
FIX:(#912) Unable to add series that have issue numbers containing 'O' and 'X'. Also updated file checking to include the same fix.
This commit is contained in:
parent
7e6a0e648a
commit
054b7cf3aa
3 changed files with 14 additions and 4 deletions
|
@ -67,7 +67,8 @@ def listFiles(dir,watchcomic,Publisher,AlternateSearch=None,manual=None,sarc=Non
|
|||
'A',
|
||||
'B',
|
||||
'C',
|
||||
'X']
|
||||
'X',
|
||||
'O']
|
||||
|
||||
extensions = ('.cbr', '.cbz', '.cb7')
|
||||
|
||||
|
|
|
@ -769,7 +769,12 @@ def cleanhtml(raw_html):
|
|||
|
||||
def issuedigits(issnum):
|
||||
import db, logger
|
||||
#print "issnum : " + str(issnum)
|
||||
|
||||
try:
|
||||
tst = issnum.isdigit()
|
||||
except:
|
||||
return 9999999999
|
||||
|
||||
if issnum.isdigit():
|
||||
int_issnum = int( issnum ) * 1000
|
||||
else:
|
||||
|
@ -849,13 +854,15 @@ def issuedigits(issnum):
|
|||
if issnum[x].isalpha():
|
||||
#take first occurance of alpha in string and carry it through
|
||||
tstord = issnum[x:].rstrip()
|
||||
tstord = re.sub('[\-\,\.\+]','', tstord).rstrip()
|
||||
issno = issnum[:x].rstrip()
|
||||
issno = re.sub('[\-\,\.\+]','', issno).rstrip()
|
||||
try:
|
||||
isschk = float(issno)
|
||||
except ValueError, e:
|
||||
if len(issnum) == 1 and issnum.isalpha():
|
||||
break
|
||||
logger.fdebug('invalid numeric for issue - cannot be found. Ignoring.')
|
||||
logger.fdebug('[' + issno + '] Invalid numeric for issue - cannot be found. Ignoring.')
|
||||
issno = None
|
||||
tstord = None
|
||||
invchk = "true"
|
||||
|
|
|
@ -1192,14 +1192,16 @@ def updateissuedata(comicid, comicname=None, issued=None, comicIssues=None, call
|
|||
if issnum[x].isalpha():
|
||||
#take first occurance of alpha in string and carry it through
|
||||
tstord = issnum[x:].rstrip()
|
||||
tstord = re.sub('[\-\,\.\+]','', tstord).rstrip()
|
||||
issno = issnum[:x].rstrip()
|
||||
issno = re.sub('[\-\,\.\+]','', issno).rstrip()
|
||||
try:
|
||||
isschk = float(issno)
|
||||
except ValueError, e:
|
||||
if len(issnum) == 1 and issnum.isalpha():
|
||||
logger.fdebug('detected lone alpha issue. Attempting to figure this out.')
|
||||
break
|
||||
logger.fdebug('invalid numeric for issue - cannot be found. Ignoring.')
|
||||
logger.fdebug('[' + issno + '] Invalid numeric for issue - cannot be found. Ignoring.')
|
||||
issno = None
|
||||
tstord = None
|
||||
invchk = "true"
|
||||
|
|
Loading…
Reference in a new issue