From bc88a3ff01e99ac5a60df770fe94a8040f3a2c6e Mon Sep 17 00:00:00 2001 From: evilhero Date: Wed, 27 Feb 2019 16:08:14 -0500 Subject: [PATCH] FIX: fix when adding series - volume information in some cases wasn't able to be parsed properly --- mylar/cv.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mylar/cv.py b/mylar/cv.py index 678da10f..8eb90afe 100755 --- a/mylar/cv.py +++ b/mylar/cv.py @@ -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)