From 1250dbf21923ccf9b12d5cd334887b90c8c13096 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 23 Aug 2024 14:52:02 -0700 Subject: feat(SequelCatcher): show current progress --- src/lib/Tools/SequelCatcher/List.svelte | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/lib/Tools/SequelCatcher/List.svelte b/src/lib/Tools/SequelCatcher/List.svelte index 129cea5f..71513e76 100644 --- a/src/lib/Tools/SequelCatcher/List.svelte +++ b/src/lib/Tools/SequelCatcher/List.svelte @@ -8,13 +8,19 @@ let includeCurrent = false; - const matchCheck = (media: Media | undefined) => + const matchCheck = (media: Media | undefined, swap = false) => (media && media.mediaListEntry && media.mediaListEntry?.status !== 'CURRENT' && media.mediaListEntry?.status !== 'REPEATING' && media.mediaListEntry?.status !== 'PAUSED') || - !media; + !media + ? swap + ? undefined + : media + : swap + ? media + : undefined; Include current (watching, rewatching, @@ -36,6 +42,11 @@ paused)
    {#each unwatchedRelations as relation} + {@const hit = matchCheck( + mediaListUnchecked.find((media) => media.id === relation.node.id), + true + )} + {#if matchCheck(mediaListUnchecked.find((media) => media.id === relation.node.id)) || includeCurrent}
  1. + {#if hit && hit.mediaListEntry && hit.mediaListEntry.progress > 0} + | + + {hit.mediaListEntry.progress}/{#if hit.episodes}{hit.episodes}{:else}?{/if} + {/if} + ({relation.node.startDate.year}) -- cgit v1.2.3