mirror of https://github.com/evilhero/mylar
FIX: When series description had the word 'after the' followed by a CVID, would incorrectly assume it was a different edition type instead of a Print Edition, IMP: Added keywords dict to help maintain the description words to avoid in cases like the above
This commit is contained in:
parent
90022b6013
commit
0733aa0f39
|
@ -343,6 +343,7 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
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'
|
||||
avoidwords = ['preceding', 'after the special']
|
||||
while i < 2:
|
||||
if i == 0:
|
||||
cbd = 'one-shot'
|
||||
|
@ -350,14 +351,13 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
cbd = 'one shot'
|
||||
tmp1 = comic_desc[:60].lower().find(cbd)
|
||||
if tmp1 != -1:
|
||||
tmp2 = comic_desc[:60].lower().find('preceding')
|
||||
for x in avoidwords:
|
||||
tmp2 = comic_desc[:tmp1].lower().find(x)
|
||||
if tmp2 != -1:
|
||||
logger.fdebug('FAKE NEWS: caught incorrect reference to one-shot. Forcing to Print')
|
||||
comic['Type'] = 'Print'
|
||||
i = 3
|
||||
break
|
||||
else:
|
||||
i+=1
|
||||
else:
|
||||
i+=1
|
||||
else:
|
||||
comic['Type'] = 'Print'
|
||||
|
|
Loading…
Reference in New Issue