aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/due/html.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/due/html.py b/src/due/html.py
index c2f78a7..3c9fdbf 100644
--- a/src/due/html.py
+++ b/src/due/html.py
@@ -78,6 +78,7 @@ def manga_to_html(releasing_outdated_manga, show_missing):
manga = media["media"]
title = manga["title"]["native"]
id = manga["id"]
+ previous_volume_largest_chapter = 0
if id in ids:
return
@@ -138,6 +139,14 @@ def manga_to_html(releasing_outdated_manga, show_missing):
cache.set(str(manga["id"]) + "ag", manga_chapter_aggregate)
if "none" in manga_chapter_aggregate["volumes"]:
+ previous_volume_largest_chapter = list(
+ manga_chapter_aggregate["volumes"][
+ str(
+ dict(enumerate(manga_chapter_aggregate["volumes"])).get(1)
+ or "none"
+ )
+ ]["chapters"]
+ )[0]
available = list(
manga_chapter_aggregate["volumes"]["none"]["chapters"]
)[0]
@@ -150,7 +159,7 @@ def manga_to_html(releasing_outdated_manga, show_missing):
try:
available = list(
manga_chapter_aggregate["volumes"][
- str(len(list(manga_chapter_aggregate["volumes"])))
+ str(list(manga_chapter_aggregate["volumes"])[0])
]["chapters"]
)[0]
except Exception:
@@ -187,6 +196,9 @@ def manga_to_html(releasing_outdated_manga, show_missing):
if str(available)[0].isdigit():
available = math.floor(float(available))
+ if math.floor(float(previous_volume_largest_chapter)) > available:
+ available = math.floor(float(previous_volume_largest_chapter))
+
if int(progress) >= int(available):
ids.pop()