1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-25 09:11:46 +00:00

FIX: comics that had alot of issues would take forever to initially add (improved speed performance).

This commit is contained in:
evilhero 2013-01-24 13:31:03 -05:00
parent a831608d37
commit 4d1b61846b
2 changed files with 6 additions and 3 deletions

View file

@ -23,7 +23,7 @@ import datetime
from decimal import Decimal
from HTMLParser import HTMLParseError
def GCDScraper(ComicName, ComicYear, Total, ComicID):
def GCDScraper(ComicName, ComicYear, Total, ComicID, quickmatch=None):
NOWyr = datetime.date.today().year
if datetime.date.today().month == 12:
NOWyr = NOWyr + 1
@ -148,8 +148,11 @@ def GCDScraper(ComicName, ComicYear, Total, ComicID):
if 'and' in ComicName.lower():
ComicName = ComicName.replace('and', '&')
return GCDScraper(ComicName, ComicYear, Total, ComicID)
return 'No Match'
if not quickmatch: return 'No Match'
#vari_loop = 0
if quickmatch == "yes":
if resultURL is None: return 'No Match'
else: return 'Match'
return GCDdetails(comseries=None, resultURL=resultURL, vari_loop=0, ComicID=ComicID, TotalIssues=TotalIssues, issvariation=issvariation, resultPublished=resultPublished)

View file

@ -115,7 +115,7 @@ class WebInterface(object):
#here we test for exception matches (ie. comics spanning more than one volume, known mismatches, etc).
CV_EXcomicid = myDB.action("SELECT * from exceptions WHERE ComicID=?", [comicid]).fetchone()
if CV_EXcomicid is None: # pass #
gcdinfo=parseit.GCDScraper(comicname, comicyear, comicissues, comicid)
gcdinfo=parseit.GCDScraper(comicname, comicyear, comicissues, comicid, quickmatch="yes")
if gcdinfo == "No Match":
#when it no matches, the image will always be blank...let's fix it.
cvdata = mylar.cv.getComic(comicid,'comic')