mirror of https://github.com/evilhero/mylar
FIX:(#659) annual error on startup, when annuals_on not enabled, FIX: error for week variable on weeklypull module
This commit is contained in:
parent
0fa7a25f17
commit
1ace479a04
|
@ -845,10 +845,7 @@ def forceRescan(ComicID,archive=None):
|
|||
archivedissues+=1
|
||||
pass
|
||||
else:
|
||||
logger.info('comiclocation: ' + str(rescan['ComicLocation']))
|
||||
logger.info('filelocation: ' + str(down['Location']))
|
||||
comicpath = os.path.join(rescan['ComicLocation'], down['Location'])
|
||||
logger.info('comicpath: ' + str(comicpath))
|
||||
if os.path.exists(comicpath):
|
||||
pass
|
||||
#print "Issue exists - no need to change status."
|
||||
|
|
|
@ -66,39 +66,21 @@ class WebInterface(object):
|
|||
comiclist = myDB.select('SELECT * from comics order by ComicSortName COLLATE NOCASE')
|
||||
for comic in comiclist:
|
||||
issue = myDB.select("SELECT * FROM issues WHERE ComicID=?", [comic['ComicID']])
|
||||
wantedc = myDB.action("SELECT COUNT(*) as count FROM issues WHERE ComicID=? AND Status='Wanted'", [comic['ComicID']]).fetchone()
|
||||
if mylar.ANNUALS_ON:
|
||||
annuals_on = True
|
||||
anwantedc = myDB.action("SELECT COUNT(*) as count FROM annuals WHERE ComicID=? AND Status='Wanted'", [comic['ComicID']]).fetchone()
|
||||
annual = myDB.action("SELECT COUNT(*) as count FROM annuals WHERE ComicID=?", [comic['ComicID']]).fetchone()
|
||||
annualcount = annual[0]
|
||||
if not annualcount:
|
||||
annualcount = 0
|
||||
anns = anwantedc[0]
|
||||
else:
|
||||
annualcount = 0
|
||||
anns = 0
|
||||
else:
|
||||
annuals_on = False
|
||||
anwantedc = 0
|
||||
annual = 0
|
||||
annual = None
|
||||
annualcount = 0
|
||||
totalissues = comic['Total'] + annualcount
|
||||
haveissues = comic['Have']
|
||||
wants = wantedc[0]
|
||||
|
||||
if not haveissues:
|
||||
havetracks = 0
|
||||
if not wants:
|
||||
wants = 0
|
||||
if not anns:
|
||||
anns = 0
|
||||
|
||||
try:
|
||||
wantpercent = (wants*100.0)/totalissues
|
||||
if wantpercent > 100:
|
||||
wantpercent = 100
|
||||
except (ZeroDivisionError, TypeError):
|
||||
wantpercent = 0
|
||||
wants = '?'
|
||||
|
||||
try:
|
||||
percent = (haveissues*100.0)/totalissues
|
||||
|
|
|
@ -809,7 +809,7 @@ def checkthis(datecheck,datestatus,usedate):
|
|||
logger.fdebug('Store Date falls within acceptable range - series MATCH')
|
||||
valid_check = True
|
||||
elif int(datecheck) < int(usedate):
|
||||
logger.fdebug('The issue date of issue #' + str(week['ISSUE']) + ' was on ' + str(datecheck) + ' which is prior to ' + str(week['SHIPDATE']))
|
||||
logger.fdebug('The issue date of issue was on ' + str(datecheck) + ' which is prior to ' + str(usedate))
|
||||
valid_check = False
|
||||
|
||||
return valid_check
|
||||
|
|
Loading…
Reference in New Issue