mirror of https://github.com/evilhero/mylar
FIX:(#1321) Pull list download button creates 500 Internal Server Error, FIX:(#1323) Add One-Off generates 500 Internal Server Error
This commit is contained in:
parent
9d0ba136de
commit
6768e0e950
|
@ -42,7 +42,7 @@
|
||||||
<input type="checkbox" name="weekfolder" id="weekfolder" value="1" ${checked(mylar.WEEKFOLDER)} /><label>Store in Weekly Directory (${weekfold})</label>
|
<input type="checkbox" name="weekfolder" id="weekfolder" value="1" ${checked(mylar.WEEKFOLDER)} /><label>Store in Weekly Directory (${weekfold})</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="hidden" name="pulldate" value=${weekinfo}>
|
<input type="hidden" name="pulldate" value="${weekinfo}">
|
||||||
<input type="submit" style="display:none" />
|
<input type="submit" style="display:none" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1285,7 +1285,7 @@ class WebInterface(object):
|
||||||
if Publisher == 'COMICS': Publisher = None
|
if Publisher == 'COMICS': Publisher = None
|
||||||
if ComicYear == '': ComicYear = now.year
|
if ComicYear == '': ComicYear = now.year
|
||||||
logger.info(u"Marking " + ComicName + " " + ComicIssue + " as wanted...")
|
logger.info(u"Marking " + ComicName + " " + ComicIssue + " as wanted...")
|
||||||
foundcom, prov = search.search_init(ComicName=ComicName, IssueNumber=ComicIssue, ComicYear=ComicYear, SeriesYear=None, Publisher=Publisher, IssueDate=cyear['SHIPDATE'], StoreDate=cyear['SHIPDATE'], IssueID=None, AlternateSearch=None, UseFuzzy=None, ComicVersion=None,allowpacks=False)
|
foundcom, prov = search.search_init(ComicName=ComicName, IssueNumber=ComicIssue, ComicYear=ComicYear, SeriesYear=None, Publisher=Publisher, IssueDate=cyear['SHIPDATE'], StoreDate=cyear['SHIPDATE'], IssueID=None, AlternateSearch=None, UseFuzzy=None, ComicVersion=None, allow_packs=False)
|
||||||
if foundcom == "yes":
|
if foundcom == "yes":
|
||||||
logger.info(u"Downloaded " + ComicName + " " + ComicIssue)
|
logger.info(u"Downloaded " + ComicName + " " + ComicIssue)
|
||||||
raise cherrypy.HTTPRedirect("pullist")
|
raise cherrypy.HTTPRedirect("pullist")
|
||||||
|
@ -3069,7 +3069,12 @@ class WebInterface(object):
|
||||||
dstdir = mylar.WEEKFOLDER_LOC
|
dstdir = mylar.WEEKFOLDER_LOC
|
||||||
else:
|
else:
|
||||||
dstdir = mylar.DESTINATION_DIR
|
dstdir = mylar.DESTINATION_DIR
|
||||||
desdir = os.path.join(dstdir, str( str(pulldate['year']) + '-' + str(pulldate['weeknumber']) ))
|
import ast
|
||||||
|
pulldate = ast.literal_eval(pulldate)
|
||||||
|
logger.info('pulldate: ' + str(pulldate))
|
||||||
|
yr = pulldate['year']
|
||||||
|
wk = pulldate['weeknumber']
|
||||||
|
desdir = os.path.join(dstdir, str(yr) + '-' + str(wk))
|
||||||
if os.path.isdir(desdir):
|
if os.path.isdir(desdir):
|
||||||
logger.info(u"Directory (" + desdir + ") already exists! Continuing...")
|
logger.info(u"Directory (" + desdir + ") already exists! Continuing...")
|
||||||
else:
|
else:
|
||||||
|
@ -3085,7 +3090,7 @@ class WebInterface(object):
|
||||||
else:
|
else:
|
||||||
desdir = mylar.GRABBAG_DIR
|
desdir = mylar.GRABBAG_DIR
|
||||||
|
|
||||||
clist = myDB.select("SELECT * FROM Weekly AND weeknumber=? WHERE Status='Downloaded'", [pulldate['weeknumber']])
|
clist = myDB.select("SELECT * FROM weekly WHERE weeknumber=? AND Status='Downloaded'", [pulldate['weeknumber']])
|
||||||
if clist is None: # nothing on the list, just go go gone
|
if clist is None: # nothing on the list, just go go gone
|
||||||
logger.info("There aren't any issues downloaded from this week yet.")
|
logger.info("There aren't any issues downloaded from this week yet.")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue