FIX: if series' had identical names, both would get latest issue from weekly pull list if present regardless of year, FIX: newznab and nzbx wouldn't search for new issues on the weekly list when adding a new series

This commit is contained in:
evilhero 2013-01-18 04:18:31 -05:00
parent 8ac3da86dd
commit 36840d3612
4 changed files with 38 additions and 31 deletions

View File

@ -367,8 +367,9 @@ def addComictoDB(comicid,mismatch=None,pullupd=None):
logger.info(u"Updating complete for: " + comic['ComicName'])
if pullupd is None:
# lets' check the pullist for anyting at this time as well since we're here.
if mylar.AUTOWANT_UPCOMING:
# lets' check the pullist for anything at this time as well since we're here.
# do this for only Present comics....
if mylar.AUTOWANT_UPCOMING and 'Present' in gcdinfo['resultPublished']:
logger.info(u"Checking this week's pullist for new issues of " + str(comic['ComicName']))
updater.newpullcheck(comic['ComicName'], comicid)
@ -380,7 +381,7 @@ def addComictoDB(comicid,mismatch=None,pullupd=None):
for result in results:
foundNZB = "none"
if (mylar.NZBSU or mylar.DOGNZB or mylar.EXPERIMENTAL) and (mylar.SAB_HOST):
if (mylar.NZBSU or mylar.DOGNZB or mylar.EXPERIMENTAL or mylar.NEWZNAB or mylar.NZBX) and (mylar.SAB_HOST):
foundNZB = search.searchforissue(result['IssueID'])
if foundNZB == "yes":
updater.foundsearch(result['ComicID'], result['IssueID'])
@ -409,6 +410,7 @@ def GCDimport(gcomicid, pullupd=None):
ComicName = comic[0]
ComicYear = comic[1]
ComicIssues = comic[2]
ComicPublished = comic[3]
comlocation = comic[5]
ComicPublisher = comic[6]
#ComicImage = comic[4]
@ -659,7 +661,7 @@ def GCDimport(gcomicid, pullupd=None):
if pullupd is None:
# lets' check the pullist for anyting at this time as well since we're here.
if mylar.AUTOWANT_UPCOMING:
if mylar.AUTOWANT_UPCOMING and 'Present' in ComicPublished:
logger.info(u"Checking this week's pullist for new issues of " + str(ComicName))
updater.newpullcheck(comic['ComicName'], gcomicid)
@ -671,7 +673,7 @@ def GCDimport(gcomicid, pullupd=None):
for result in results:
foundNZB = "none"
if (mylar.NZBSU or mylar.DOGNZB or mylar.EXPERIMENTAL or mylar.NEWZNAB) and (mylar.SAB_HOST):
if (mylar.NZBSU or mylar.DOGNZB or mylar.EXPERIMENTAL or mylar.NEWZNAB or mylar.NZBX) and (mylar.SAB_HOST):
foundNZB = search.searchforissue(result['IssueID'])
if foundNZB == "yes":
updater.foundsearch(result['ComicID'], result['IssueID'])

View File

@ -455,11 +455,11 @@ def ComChk(ComicName, ComicYear, ComicPublisher, Total, ComicID):
comicis = Total
comicid = ComicID
comicpub = ComicPublisher
#print ( "comicname: " + str(comicnm) )
#print ( "comicyear: " + str(comicyr) )
#print ( "comichave: " + str(comicis) )
#print ( "comicpub: " + str(comicpub) )
#print ( "comicid: " + str(comicid) )
print ( "comicname: " + str(comicnm) )
print ( "comicyear: " + str(comicyr) )
print ( "comichave: " + str(comicis) )
print ( "comicpub: " + str(comicpub) )
print ( "comicid: " + str(comicid) )
# do 3 runs at the comics.org search to get the best results
comicrun = []
# &pub_name=DC

View File

@ -105,11 +105,11 @@ class WebInterface(object):
sresults = []
cresults = []
mismatch = "no"
print ("comicid: " + str(comicid))
print ("comicname: " + str(comicname))
print ("comicyear: " + str(comicyear))
print ("comicissues: " + str(comicissues))
print ("comicimage: " + str(comicimage))
#print ("comicid: " + str(comicid))
#print ("comicname: " + str(comicname))
#print ("comicyear: " + str(comicyear))
#print ("comicissues: " + str(comicissues))
#print ("comicimage: " + str(comicimage))
#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 #
@ -123,7 +123,7 @@ class WebInterface(object):
logger.info(u"I couldn't find an exact match for " + str(comicname) + " (" + str(comicyear) + ") - gathering data for Error-Checking screen (this could take a minute)..." )
i = 0
loopie, cnt = parseit.ComChk(comicname, comicyear, comicpublisher, comicissues, comicid)
print ("total count : " + str(cnt))
#print ("total count : " + str(cnt))
while (i < cnt):
try:
stoopie = loopie['comchkchoice'][i]
@ -626,7 +626,8 @@ class WebInterface(object):
self.from_Exceptions(comicid=comicid,gcdid=errorgcd)
else:
print ("Assuming rewording of Comic - adjusting to : " + str(errorgcd))
self.addComic(errorgcd)
Err_Info = mylar.cv.getComic(comicid,'comic')
self.addComic(comicid=comicid,comicname=errorgcd, comicyear=Err_Info['ComicYear'], comicissues=Err_Info['ComicIssues'], comicpublisher=Err_Info['ComicPublisher'])
error_change.exposed = True

View File

@ -333,6 +333,7 @@ def pullitcheck(comic1off_name=None,comic1off_id=None):
unlines = []
llen = []
ccname = []
pubdate = []
w = 0
tot = 0
chkout = []
@ -360,25 +361,28 @@ def pullitcheck(comic1off_name=None,comic1off_id=None):
w = 1
else:
#let's read in the comic.watchlist from the db here
cur.execute("SELECT ComicID, ComicName, ComicYear, ComicPublisher from comics")
cur.execute("SELECT ComicID, ComicName, ComicYear, ComicPublisher, ComicPublished from comics")
while True:
watchd = cur.fetchone()
#print ("watchd: " + str(watchd))
if watchd is None:
break
a_list.append(watchd[1])
b_list.append(watchd[2])
comicid.append(watchd[0])
#print ( "Comic:" + str(a_list[w]) + " Year: " + str(b_list[w]) )
#if "WOLVERINE AND THE X-MEN" in str(a_list[w]): a_list[w] = "WOLVERINE AND X-MEN"
lines.append(a_list[w].strip())
unlines.append(a_list[w].strip())
llen.append(a_list[w].splitlines())
ccname.append(a_list[w].strip())
tmpwords = a_list[w].split(None)
ltmpwords = len(tmpwords)
ltmp = 1
w+=1
if 'Present' in watchd[4]:
# let's not even bother with comics that are in the Present.
a_list.append(watchd[1])
b_list.append(watchd[2])
comicid.append(watchd[0])
pubdate.append(watchd[4])
#print ( "Comic:" + str(a_list[w]) + " Year: " + str(b_list[w]) )
#if "WOLVERINE AND THE X-MEN" in str(a_list[w]): a_list[w] = "WOLVERINE AND X-MEN"
lines.append(a_list[w].strip())
unlines.append(a_list[w].strip())
llen.append(a_list[w].splitlines())
ccname.append(a_list[w].strip())
tmpwords = a_list[w].split(None)
ltmpwords = len(tmpwords)
ltmp = 1
w+=1
cnt = int(w-1)
cntback = int(w-1)
kp = []