mirror of
https://github.com/evilhero/mylar
synced 2024-12-27 18:16:52 +00:00
FIX: When series contained a numeric and a volume label, and the issue number was identical - would fail to scan in correctly
This commit is contained in:
parent
e485e054be
commit
5f3b76ea67
1 changed files with 7 additions and 6 deletions
|
@ -219,7 +219,7 @@ class FileChecker(object):
|
||||||
|
|
||||||
|
|
||||||
#parse out the extension for type
|
#parse out the extension for type
|
||||||
comic_ext = ('.cbr','.cbz','.cb7')
|
comic_ext = ('.cbr','.cbz','.cb7','.pdf')
|
||||||
if os.path.splitext(filename)[1].endswith(comic_ext):
|
if os.path.splitext(filename)[1].endswith(comic_ext):
|
||||||
filetype = os.path.splitext(filename)[1]
|
filetype = os.path.splitext(filename)[1]
|
||||||
else:
|
else:
|
||||||
|
@ -316,8 +316,9 @@ class FileChecker(object):
|
||||||
file_length = 0
|
file_length = 0
|
||||||
validcountchk = False
|
validcountchk = False
|
||||||
sep_volume = False
|
sep_volume = False
|
||||||
|
current_pos = -1
|
||||||
for sf in split_file:
|
for sf in split_file:
|
||||||
|
current_pos +=1
|
||||||
#the series title will always be first and be AT LEAST one word.
|
#the series title will always be first and be AT LEAST one word.
|
||||||
if split_file.index(sf) >= 1 and not volumeprior:
|
if split_file.index(sf) >= 1 and not volumeprior:
|
||||||
dtcheck = re.sub('[\(\)\,]', '', sf).strip()
|
dtcheck = re.sub('[\(\)\,]', '', sf).strip()
|
||||||
|
@ -520,16 +521,16 @@ class FileChecker(object):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
#check here for numeric or negative number
|
#check here for numeric or negative number
|
||||||
if sf.isdigit() and split_file.index(sf) == 0:
|
if sf.isdigit() and split_file.index(sf, current_pos) == 0:
|
||||||
continue
|
continue
|
||||||
if sf.isdigit():
|
if sf.isdigit():
|
||||||
possible_issuenumbers.append({'number': sf,
|
possible_issuenumbers.append({'number': sf,
|
||||||
'position': split_file.index(sf, lastissue_position), #modfilename.find(sf)})
|
'position': split_file.index(sf, current_pos), #modfilename.find(sf)})
|
||||||
'mod_position': self.char_file_position(modfilename, sf, lastmod_position),
|
'mod_position': self.char_file_position(modfilename, sf, lastmod_position),
|
||||||
'validcountchk': validcountchk})
|
'validcountchk': validcountchk})
|
||||||
|
|
||||||
#used to see if the issue is an alpha-numeric (ie. 18.NOW, 50-X, etc)
|
#used to see if the issue is an alpha-numeric (ie. 18.NOW, 50-X, etc)
|
||||||
lastissue_position = split_file.index(sf, lastissue_position)
|
lastissue_position = split_file.index(sf, current_pos)
|
||||||
lastissue_label = sf
|
lastissue_label = sf
|
||||||
lastissue_mod_position = file_length
|
lastissue_mod_position = file_length
|
||||||
#logger.fdebug('possible issue found: ' + str(sf)
|
#logger.fdebug('possible issue found: ' + str(sf)
|
||||||
|
@ -922,7 +923,7 @@ class FileChecker(object):
|
||||||
|
|
||||||
def traverse_directories(self, dir):
|
def traverse_directories(self, dir):
|
||||||
filelist = []
|
filelist = []
|
||||||
comic_ext = ('.cbr','.cbz','.cb7')
|
comic_ext = ('.cbr','.cbz','.cb7','.pdf')
|
||||||
|
|
||||||
dir = dir.encode(mylar.SYS_ENCODING)
|
dir = dir.encode(mylar.SYS_ENCODING)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue