From 0ff36a145fea5af08bd1ed2bcdceff4f4316a7a4 Mon Sep 17 00:00:00 2001 From: DarkSir23 Date: Thu, 15 Sep 2016 23:48:40 -0400 Subject: [PATCH] Story Arc Updates --- data/interfaces/default/storyarc_detail.html | 1 + mylar/helpers.py | 2 +- mylar/webserve.py | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/data/interfaces/default/storyarc_detail.html b/data/interfaces/default/storyarc_detail.html index e142f4b7..734948c4 100755 --- a/data/interfaces/default/storyarc_detail.html +++ b/data/interfaces/default/storyarc_detail.html @@ -136,6 +136,7 @@ %if item['Status'] is None or item['Status'] == None: Grab it + Remove it %elif item['Status'] == 'Snatched': Retry %endif diff --git a/mylar/helpers.py b/mylar/helpers.py index 0e3d0068..d3708374 100755 --- a/mylar/helpers.py +++ b/mylar/helpers.py @@ -1106,7 +1106,7 @@ def renamefile_readingorder(readorder): import logger logger.fdebug('readingorder#: ' + str(readorder)) if int(readorder) < 10: readord = "00" + str(readorder) - elif int(readorder) > 10 and int(readorder) < 99: readord = "0" + str(readorder) + elif int(readorder) >= 10 and int(readorder) < 99: readord = "0" + str(readorder) else: readord = str(readorder) return readord diff --git a/mylar/webserve.py b/mylar/webserve.py index 843d93b4..fbbbbae4 100755 --- a/mylar/webserve.py +++ b/mylar/webserve.py @@ -2301,6 +2301,7 @@ class WebInterface(object): alist = myDB.select("SELECT * from readinglist WHERE ComicName is not Null group by StoryArcID") #COLLATE NOCASE") for al in alist: totalcnt = myDB.select("SELECT * FROM readinglist WHERE StoryArcID=?", [al['StoryArcID']]) + totalissues = myDB.select("SELECT COUNT(*) as count from readinglist WHERE StoryARcID=?", [al['StoryArcID']]) lowyear = 9999 maxyear = 0 for la in totalcnt: @@ -2321,7 +2322,7 @@ class WebInterface(object): havecnt = myDB.select("SELECT COUNT(*) as count FROM readinglist WHERE StoryArcID=? AND (Status='Downloaded' or Status='Archived')", [al['StoryArcID']]) havearc = havecnt[0][0] - totalarc = int(al['TotalIssues']) + totalarc = totalissues[0][0] if not havearc: havearc = 0 try: @@ -2340,7 +2341,7 @@ class WebInterface(object): "percent": percent, "Have": havearc, "SpanYears": spanyears, - "Total": al['TotalIssues'], + "Total": totalissues[0][0], "CV_ArcID": al['CV_ArcID']}) return serve_template(templatename="storyarc.html", title="Story Arcs", arclist=arclist, delete_type=0) storyarc_main.exposed = True