FIX: fix when adding series - volume information in some cases wasn't able to be parsed properly

This commit is contained in:
evilhero 2019-02-27 16:08:14 -05:00
parent 7c305451f8
commit bc88a3ff01
1 changed files with 4 additions and 1 deletions

View File

@ -466,7 +466,10 @@ def GetComicInfo(comicid, dom, safechk=None):
#arbitrarily grab the next 10 chars (6 for volume + 1 for space + 3 for the actual vol #)
#increased to 10 to allow for text numbering (+5 max)
#sometimes it's volume 5 and ocassionally it's fifth volume.
if i == 0:
if comicDes[v_find+7:comicDes.find(' ', v_find+7)].isdigit():
comic['ComicVersion'] = re.sub("[^0-9]", "", comicDes[v_find+7:comicDes.find(' ', v_find+7)]).strip()
break
elif i == 0:
vfind = comicDes[v_find:v_find +15] #if it's volume 5 format
basenums = {'zero': '0', 'one': '1', 'two': '2', 'three': '3', 'four': '4', 'five': '5', 'six': '6', 'seven': '7', 'eight': '8', 'nine': '9', 'ten': '10', 'i': '1', 'ii': '2', 'iii': '3', 'iv': '4', 'v': '5'}
logger.fdebug('volume X format - ' + str(i) + ': ' + vfind)