aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/List/Manga/CleanMangaList.svelte9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/List/Manga/CleanMangaList.svelte b/src/lib/List/Manga/CleanMangaList.svelte
index dfaa187c..7b5b04b7 100644
--- a/src/lib/List/Manga/CleanMangaList.svelte
+++ b/src/lib/List/Manga/CleanMangaList.svelte
@@ -30,6 +30,13 @@
export let dummy = false;
let serviceStatusResponse: Promise<Response>;
+ let totalEpisodeDueCount = media
+ .map((manga) => {
+ if (manga.mediaListEntry?.status === 'COMPLETED') return 0;
+
+ return (manga.mediaListEntry?.progress || 0) - 1;
+ })
+ .reduce((a, b) => a + b, 0);
onMount(() => {
serviceStatusResponse = fetch(proxy('https://api.mangadex.org/ping'));
@@ -46,7 +53,7 @@
{#if authorised}
<ListTitle
- count={media.length}
+ count={$settings.displayTotalDueEpisodes && due ? totalEpisodeDueCount : media.length}
time={endTime / 1000}
title={due
? $locale().lists.due.mangaAndLightNovels