diff options
| author | Fuwn <[email protected]> | 2023-07-27 19:50:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-07-27 19:50:41 -0700 |
| commit | f36a152737eac8428fd21f369c8b67303bd22d09 (patch) | |
| tree | 9d96b70d03d46120c8dc4479d199882e5e95fcd3 | |
| parent | fix(html): regex order for total episodes (diff) | |
| download | old.due.moe-f36a152737eac8428fd21f369c8b67303bd22d09.tar.xz old.due.moe-f36a152737eac8428fd21f369c8b67303bd22d09.zip | |
fix(html): no progress entry media
| -rw-r--r-- | src/due/html.py | 4 | ||||
| -rw-r--r-- | src/due/routes/index.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/due/html.py b/src/due/html.py index e10bf0e..a43753b 100644 --- a/src/due/html.py +++ b/src/due/html.py @@ -49,11 +49,11 @@ def anime_to_html(releasing_outdated_anime): id = anime["id"] if id in ids: - return + continue else: ids.append(id) - progress = anime["mediaListEntry"]["progress"] + progress = (anime["mediaListEntry"] or {"progress": 0})["progress"] available = ( {"episode": 0} if media["media"]["nextAiringEpisode"] is None diff --git a/src/due/routes/index.py b/src/due/routes/index.py index 720a462..a08c498 100644 --- a/src/due/routes/index.py +++ b/src/due/routes/index.py @@ -79,7 +79,7 @@ def home(): )["episode"] ) - 1 - != int(media["media"]["mediaListEntry"]["progress"]) + != int((media["media"]["mediaListEntry"] or {"progress": 0})["progress"]) ] (anime_html, anime_length) = anime_to_html(releasing_outdated_anime) anime_time = time.time() - start |