diff options
| author | Fuwn <[email protected]> | 2023-12-22 20:53:50 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-22 20:53:50 -0800 |
| commit | 3ba77d58cd99f9e0142eedb7229b0bf5e90dd295 (patch) | |
| tree | 1e40f0d71f73fdc4ad032e5f404a4b10522f72ec /src/lib/List/Anime/AnimeListTemplate.svelte | |
| parent | feat(manga): naive auto-authorisation (diff) | |
| download | due.moe-3ba77d58cd99f9e0142eedb7229b0bf5e90dd295.tar.xz due.moe-3ba77d58cd99f9e0142eedb7229b0bf5e90dd295.zip | |
fix(anime): call subsplease once
Diffstat (limited to 'src/lib/List/Anime/AnimeListTemplate.svelte')
| -rw-r--r-- | src/lib/List/Anime/AnimeListTemplate.svelte | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/src/lib/List/Anime/AnimeListTemplate.svelte b/src/lib/List/Anime/AnimeListTemplate.svelte index 9b02fa53..957376a1 100644 --- a/src/lib/List/Anime/AnimeListTemplate.svelte +++ b/src/lib/List/Anime/AnimeListTemplate.svelte @@ -28,31 +28,31 @@ let pendingUpdate: number | null = null; </script> -{#await animeLists} - {#if previousAnimeList} - <CleanAnimeList - media={previousAnimeList} - {title} - bind:animeLists - {user} - {identity} - {endTime} - bind:lastUpdatedMedia - {completed} - bind:previousAnimeList - bind:pendingUpdate - /> - {:else} - <ListTitle custom={title} /> +{#await fetch(`/api/subsplease?tz=${Intl.DateTimeFormat().resolvedOptions().timeZone}`).then( (r) => r.json() )} + <ListTitle custom={title} /> - <ul><li>Loading ...</li></ul> - {/if} -{:then media} - {#await fetch(`/api/subsplease?tz=${Intl.DateTimeFormat().resolvedOptions().timeZone}`).then( (r) => r.json() )} - <ListTitle custom={title} /> + <ul><li>Loading ...</li></ul> +{:then subsPlease} + {#await animeLists} + {#if previousAnimeList} + <CleanAnimeList + media={previousAnimeList} + {title} + bind:animeLists + {user} + {identity} + {endTime} + bind:lastUpdatedMedia + {completed} + bind:previousAnimeList + bind:pendingUpdate + /> + {:else} + <ListTitle custom={title} /> - <ul><li>Loading ...</li></ul> - {:then subsPlease} + <ul><li>Loading ...</li></ul> + {/if} + {:then media} <CleanAnimeList media={cleanMedia(media, $settings.displayUnresolved, subsPlease, plannedOnly)} {title} @@ -62,12 +62,15 @@ {endTime} bind:lastUpdatedMedia {completed} + {subsPlease} bind:previousAnimeList bind:pendingUpdate /> + {:catch} + <ListTitle time={0} count={-1337} custom={title} /> + + <Error /> {/await} {:catch} - <ListTitle time={0} count={-1337} custom={title} /> - - <Error /> + <Error type="Subtitle release data" /> {/await} |