mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 05:24:43 +00:00
FIX: Fix for some series being determined as a One-Shot, instead of a Print due to how the description was parsed
This commit is contained in:
parent
5899c5277d
commit
51d81b17d5
1 changed files with 17 additions and 0 deletions
17
mylar/cv.py
17
mylar/cv.py
|
@ -340,7 +340,24 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
elif 'hardcover' in comic_desc[:60].lower() and 'hardcover can be found' not in comic_desc.lower():
|
||||
comic['Type'] = 'HC'
|
||||
elif any(['one-shot' in comic_desc[:60].lower(), 'one shot' in comic_desc[:60].lower()]) and 'can be found' not in comic_desc.lower():
|
||||
i = 0
|
||||
comic['Type'] = 'One-Shot'
|
||||
while i < 2:
|
||||
if i == 0:
|
||||
cbd = 'one-shot'
|
||||
elif i == 1:
|
||||
cbd = 'one shot'
|
||||
tmp1 = comic_desc[:60].lower().find(cbd)
|
||||
if tmp1 != -1:
|
||||
tmp2 = comic_desc[:60].lower().find('preceding')
|
||||
if tmp2 != -1:
|
||||
logger.fdebug('FAKE NEWS: caught incorrect reference to one-shot. Forcing to Print')
|
||||
comic['Type'] = 'Print'
|
||||
break
|
||||
else:
|
||||
i+=1
|
||||
else:
|
||||
i+=1
|
||||
else:
|
||||
comic['Type'] = 'Print'
|
||||
|
||||
|
|
Loading…
Reference in a new issue