mirror of https://github.com/evilhero/mylar
FIX: Removed unnecessary logging statments when refreshing series
This commit is contained in:
parent
f1e7b9d50e
commit
f74809f094
|
@ -698,16 +698,17 @@ def addComictoDB(comicid,mismatch=None,pullupd=None,imported=None,ogcname=None,c
|
||||||
else:
|
else:
|
||||||
logger.error(str(issnum) + ' this has an alpha-numeric in the issue # which I cannot account for.')
|
logger.error(str(issnum) + ' this has an alpha-numeric in the issue # which I cannot account for.')
|
||||||
return
|
return
|
||||||
#get the latest issue / date using the date.
|
#get the latest issue / date using the date.
|
||||||
logger.info('latest date: ' + str(latestdate))
|
#logger.info('latest date: ' + str(latestdate))
|
||||||
logger.info('first date: ' + str(firstdate))
|
#logger.info('first date: ' + str(firstdate))
|
||||||
logger.info('issue date: ' + str(firstval['Issue_Date']))
|
#logger.info('issue date: ' + str(firstval['Issue_Date']))
|
||||||
if firstval['Issue_Date'] > latestdate:
|
if firstval['Issue_Date'] > latestdate:
|
||||||
latestiss = issnum
|
latestiss = issnum
|
||||||
latestdate = str(firstval['Issue_Date'])
|
latestdate = str(firstval['Issue_Date'])
|
||||||
if firstval['Issue_Date'] < firstdate:
|
if firstval['Issue_Date'] < firstdate:
|
||||||
firstiss = issnum
|
firstiss = issnum
|
||||||
firstdate = str(firstval['Issue_Date'])
|
firstdate = str(firstval['Issue_Date'])
|
||||||
|
#--moved to lower function.
|
||||||
# # check if the issue already exists
|
# # check if the issue already exists
|
||||||
# iss_exists = myDB.action('SELECT * from issues WHERE IssueID=?', [issid]).fetchone()
|
# iss_exists = myDB.action('SELECT * from issues WHERE IssueID=?', [issid]).fetchone()
|
||||||
|
|
||||||
|
@ -733,7 +734,7 @@ def addComictoDB(comicid,mismatch=None,pullupd=None,imported=None,ogcname=None,c
|
||||||
"Int_IssueNumber": int_issnum})
|
"Int_IssueNumber": int_issnum})
|
||||||
|
|
||||||
#logger.info('issuedata: ' + str(issuedata))
|
#logger.info('issuedata: ' + str(issuedata))
|
||||||
|
#--moved to lower function
|
||||||
# if iss_exists:
|
# if iss_exists:
|
||||||
# print ("Existing status : " + str(iss_exists['Status']))
|
# print ("Existing status : " + str(iss_exists['Status']))
|
||||||
# newValueDict['Status'] = iss_exists['Status']
|
# newValueDict['Status'] = iss_exists['Status']
|
||||||
|
@ -763,8 +764,6 @@ def addComictoDB(comicid,mismatch=None,pullupd=None,imported=None,ogcname=None,c
|
||||||
logger.fdebug('initiating issue updating - just the info')
|
logger.fdebug('initiating issue updating - just the info')
|
||||||
issue_collection(issuedata,nostatus='True')
|
issue_collection(issuedata,nostatus='True')
|
||||||
|
|
||||||
#issue_collection(issuedata,nostatus='False')
|
|
||||||
|
|
||||||
#figure publish dates here...
|
#figure publish dates here...
|
||||||
styear = str(SeriesYear)
|
styear = str(SeriesYear)
|
||||||
#if SeriesYear == '0000':
|
#if SeriesYear == '0000':
|
||||||
|
@ -827,10 +826,10 @@ def addComictoDB(comicid,mismatch=None,pullupd=None,imported=None,ogcname=None,c
|
||||||
|
|
||||||
#check for existing files...
|
#check for existing files...
|
||||||
statbefore = myDB.action("SELECT * FROM issues WHERE ComicID=? AND Issue_Number=?", [comicid,str(latestiss)]).fetchone()
|
statbefore = myDB.action("SELECT * FROM issues WHERE ComicID=? AND Issue_Number=?", [comicid,str(latestiss)]).fetchone()
|
||||||
logger.info('status before chk :' + statbefore['Status'])
|
logger.fdebug('issue: ' + str(latestiss) + ' status before chk :' + statbefore['Status'])
|
||||||
updater.forceRescan(comicid)
|
updater.forceRescan(comicid)
|
||||||
statafter = myDB.action("SELECT * FROM issues WHERE ComicID=? AND Issue_Number=?", [comicid,str(latestiss)]).fetchone()
|
statafter = myDB.action("SELECT * FROM issues WHERE ComicID=? AND Issue_Number=?", [comicid,str(latestiss)]).fetchone()
|
||||||
logger.info('status after chk :' + statafter['Status'])
|
logger.fdebug('issue: ' + str(latestiss) + ' status after chk :' + statafter['Status'])
|
||||||
|
|
||||||
if pullupd is None:
|
if pullupd is None:
|
||||||
# lets' check the pullist for anything at this time as well since we're here.
|
# lets' check the pullist for anything at this time as well since we're here.
|
||||||
|
@ -1205,7 +1204,7 @@ def issue_collection(issuedata,nostatus):
|
||||||
|
|
||||||
logger.info('issue collection...')
|
logger.info('issue collection...')
|
||||||
if issuedata:
|
if issuedata:
|
||||||
logger.info('issuedata exists')
|
#logger.info('issuedata exists')
|
||||||
for issue in issuedata:
|
for issue in issuedata:
|
||||||
|
|
||||||
|
|
||||||
|
@ -1220,14 +1219,14 @@ def issue_collection(issuedata,nostatus):
|
||||||
|
|
||||||
|
|
||||||
if nostatus == 'False':
|
if nostatus == 'False':
|
||||||
logger.info('issue')
|
#logger.info('issue')
|
||||||
# check if the issue already exists
|
# check if the issue already exists
|
||||||
iss_exists = myDB.action('SELECT * from issues WHERE IssueID=?', [issue['IssueID']]).fetchone()
|
iss_exists = myDB.action('SELECT * from issues WHERE IssueID=?', [issue['IssueID']]).fetchone()
|
||||||
|
|
||||||
# Only change the status & add DateAdded if the issue is already in the database
|
# Only change the status & add DateAdded if the issue is already in the database
|
||||||
if iss_exists is None:
|
if iss_exists is None:
|
||||||
newValueDict['DateAdded'] = helpers.today()
|
newValueDict['DateAdded'] = helpers.today()
|
||||||
print "issue doesn't exist in db."
|
#print "issue doesn't exist in db."
|
||||||
if mylar.AUTOWANT_ALL:
|
if mylar.AUTOWANT_ALL:
|
||||||
newValueDict['Status'] = "Wanted"
|
newValueDict['Status'] = "Wanted"
|
||||||
elif issue['IssueDate'] > helpers.today() and mylar.AUTOWANT_UPCOMING:
|
elif issue['IssueDate'] > helpers.today() and mylar.AUTOWANT_UPCOMING:
|
||||||
|
@ -1236,11 +1235,11 @@ def issue_collection(issuedata,nostatus):
|
||||||
newValueDict['Status'] = "Skipped"
|
newValueDict['Status'] = "Skipped"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print ("Existing status : " + str(iss_exists['Status']))
|
#print ("Existing status : " + str(iss_exists['Status']))
|
||||||
newValueDict['Status'] = iss_exists['Status']
|
newValueDict['Status'] = iss_exists['Status']
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print ("Not changing the status at this time - reverting to previous module after to re-append existing status")
|
#print ("Not changing the status at this time - reverting to previous module after to re-append existing status")
|
||||||
newValueDict['Status'] = "Skipped"
|
newValueDict['Status'] = "Skipped"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue