1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-25 09:11:46 +00:00

FIX:(#1114)(#1116) When manually post-processing, would incorrectly identify series that contain partial words of other similar series on the watchlist

This commit is contained in:
evilhero 2015-08-26 13:00:40 -04:00
parent e3e36ced71
commit acc821767f
2 changed files with 33 additions and 15 deletions

View file

@ -321,11 +321,15 @@ def GetComicInfo(comicid, dom, safechk=None):
vfindit = re.findall('[^()]+', vfind)
vfind = vfindit[0]
vf = re.findall('[^<>]+', vfind)
ledigit = re.sub("[^0-9]", "", vf[0])
if ledigit != '':
comic['ComicVersion'] = ledigit
logger.fdebug("Volume information found! Adding to series record : volume " + comic['ComicVersion'])
break
try:
ledigit = re.sub("[^0-9]", "", vf[0])
if ledigit != '':
comic['ComicVersion'] = ledigit
logger.fdebug("Volume information found! Adding to series record : volume " + comic['ComicVersion'])
break
except:
pass
i += 1
else:
i += 1

View file

@ -702,8 +702,12 @@ def listFiles(dir, watchcomic, Publisher, AlternateSearch=None, manual=None, sar
logger.fdebug('[FILECHECKER] after title removed from SUBNAME [' + justthedigits_1 + ']')
exceptionmatch = [x for x in issue_exceptions if x.lower() in justthedigits_1.lower()]
if exceptionmatch:
logger.fdebug('[FILECHECKER] Remapping to accomodate ' + str(exceptionmatch))
digitchk = 0
for x in exceptionmatch:
findst = justthedigits_1.find(x)
if re.sub(' ','', justthedigits_1[findst-1]).isdigit() or re.sub(' ', '', justthedigits_1[findst:findst+1]).isdigit():
logger.fdebug('[FILECHECKER] Remapping to accomodate ' + str(x))
digitchk = 0
break
titlechk = False
if digitchk:
@ -780,14 +784,24 @@ def listFiles(dir, watchcomic, Publisher, AlternateSearch=None, manual=None, sar
justthedigits = justthedigits_1.split(' ', 1)[0]
digitsvalid = "false"
if not justthedigits.isdigit() and 'annual' not in justthedigits.lower():
logger.fdebug('[FILECHECKER] Invalid character found in filename after item removal - cannot find issue # with this present. Temporarily removing it from the comparison to be able to proceed.')
try:
justthedigits = justthedigits_1.split(' ', 1)[1]
if justthedigits.isdigit():
digitsvalid = "true"
except:
pass
if not justthedigits.isdigit() and 'annual' not in justthedigits.lower() and digitchk is None:
#check the length and compare number of words to remove some bad matches (ie. secret wars / secret wars journal)
wordsplit_sub = subname.split()
wordsplit_mod = modwatchcomic.split()
logger.fdebug('[FILECHECKER] digitchk: ' + str(digitchk))
logger.fdebug('[FILECHECKER] wordsplit_sub : ' + str(wordsplit_sub))
logger.fdebug('[FILECHECKER] wordsplit_mod : ' + str(wordsplit_mod))
if wordsplit_sub != wordsplit_mod:
logger.fdebug('[FILECHECKER] Word lengths do not match. Ignoring comparions.')
continue
else:
try:
justthedigits = justthedigits_1.split(' ', 1)[1]
if justthedigits.isdigit():
digitsvalid = "true"
except:
pass
if digitsvalid == "false":
if 'annual' not in justthedigits.lower():