From 478da07bf7fa6eab587650e487ed34cc220017f4 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Mon, 28 Aug 2023 01:39:25 -0700
Subject: feat(settings): toggle zero progress media

---
 src/lib/List/Due/AnimeList.svelte | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'src/lib/List/Due/AnimeList.svelte')

diff --git a/src/lib/List/Due/AnimeList.svelte b/src/lib/List/Due/AnimeList.svelte
index 366adfc4..334b47fe 100644
--- a/src/lib/List/Due/AnimeList.svelte
+++ b/src/lib/List/Due/AnimeList.svelte
@@ -5,6 +5,7 @@
 	import anime from '../../../stores/anime';
 	import animeLastPrune from '../../../stores/mangaLastPrune';
 	import sortByDifference from '../../../stores/sortByDifference';
+	import displayNotStarted from '../../../stores/displayNotStarted';
 
 	export let user: AniListAuthorisation;
 	export let identity: UserIdentity;
@@ -25,7 +26,12 @@
 		}
 
 		const flattenedLists = flattenLists(media);
-		const releasingMedia = flattenedLists.filter((media: Media) => media['status'] == 'RELEASING');
+		const releasingMedia = flattenedLists.filter(
+			(media: Media) =>
+				media['status'] == 'RELEASING' &&
+				(media['mediaListEntry'] || { progress: 0 })['progress'] >=
+					($displayNotStarted === 'true' ? 0 : 1)
+		);
 		const outdatedMedia = releasingMedia.filter((media: Media) => {
 			return (
 				(media['nextAiringEpisode'] || { episode: 0 })['episode'] - 1 !=
-- 
cgit v1.2.3

