1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-22 15:52:47 +00:00

FIX:(#2372) Fix for file parser not picking up titles in the Series (Year) Issue format in some cases

This commit is contained in:
evilhero 2019-12-24 14:27:06 -05:00
parent d5b889720a
commit cbb89e1b60

View file

@ -271,17 +271,23 @@ class FileChecker(object):
if mylar.CONFIG.FOLDER_SCAN_LOG_VERBOSE: if mylar.CONFIG.FOLDER_SCAN_LOG_VERBOSE:
logger.fdebug('[SARC] Removed Reading Order sequence from subname. Now set to : %s' % modfilename) logger.fdebug('[SARC] Removed Reading Order sequence from subname. Now set to : %s' % modfilename)
#2019-10-13---
#make sure all the brackets are properly spaced apart #make sure all the brackets are properly spaced apart
m = re.findall('[^()]+', modfilename) m = re.findall('[^()]+', modfilename)
cnt = 1 cnt = 1
#2019-12-24----fixed to accomodate naming convention like Amazing Mary Jane (2019) 002.cbr, and to account for brackets properly
try:
while cnt < len(m): while cnt < len(m):
if modfilename[modfilename.find('('+m[cnt]+')')-1] != ' ': #logger.fdebug('[m=%s] modfilename.find: %s' % (m[cnt], modfilename[modfilename.find('('+m[cnt]+')')+len(m[cnt])+2]))
#logger.fdebug('space-1: %s' % modfilename[modfilename.find('('+m[cnt]+')')-1]) #logger.fdebug('mod_1: %s' % modfilename.find('('+m[cnt]+')'))
#logger.fdebug('space-2: %s' % modfilename[modfilename.find('('+m[cnt]+')'):]) if modfilename[modfilename.find('('+m[cnt]+')')-1] != ' ' and modfilename.find('('+m[cnt]+')') != -1:
#logger.fdebug('before_space: %s' % modfilename[modfilename.find('('+m[cnt]+')')-1])
#logger.fdebug('after_space: %s' % modfilename[modfilename.find('('+m[cnt]+')')+len(m[cnt])+2])
modfilename = '%s%s%s' % (modfilename[:modfilename.find('('+m[cnt]+')')], ' ', modfilename[modfilename.find('('+m[cnt]+')'):]) modfilename = '%s%s%s' % (modfilename[:modfilename.find('('+m[cnt]+')')], ' ', modfilename[modfilename.find('('+m[cnt]+')'):])
cnt+=1 cnt+=1
#---end 2019-10-13 except Exception as e:
#logger.warn('[ERROR] %s' % e)
pass
#---end 2019-12-24
#grab the scanner tags here. #grab the scanner tags here.
scangroup = None scangroup = None