diff options
| author | Fuwn <[email protected]> | 2023-12-16 18:50:51 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-16 18:50:51 -0800 |
| commit | b018bd62213b1a72114ecf47c6676204e33bd429 (patch) | |
| tree | 8b8ece187917e99fc5591fe2f5fa271861e8b260 /src/lib/Tools | |
| parent | feat(api): subsplease endpoint (diff) | |
| download | due.moe-b018bd62213b1a72114ecf47c6676204e33bd429.tar.xz due.moe-b018bd62213b1a72114ecf47c6676204e33bd429.zip | |
feat(anime): subtitle countdown
Diffstat (limited to 'src/lib/Tools')
| -rw-r--r-- | src/lib/Tools/SequelSpy.svelte | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/Tools/SequelSpy.svelte b/src/lib/Tools/SequelSpy.svelte index 56f40956..e8cc98bf 100644 --- a/src/lib/Tools/SequelSpy.svelte +++ b/src/lib/Tools/SequelSpy.svelte @@ -8,6 +8,7 @@ import type { Media } from '$lib/AniList/media'; import { page } from '$app/stores'; import { browser } from '$app/environment'; + import type { SubsPlease } from '$lib/subsPlease'; export let user: AniListAuthorisation; @@ -42,7 +43,8 @@ onMount(() => clearAllParameters(['year', 'season'])); - const prequelAiringTime = (prequel: MediaPrequel) => airingTime(prequel as unknown as Media); + const prequelAiringTime = (prequel: MediaPrequel, subsPlease: SubsPlease) => + airingTime(prequel as unknown as Media, subsPlease); </script> <p> @@ -66,7 +68,11 @@ </a> <span style="opacity: 50%;">|</span> {prequel.seen}<span style="opacity: 50%;">/{prequel.episodes}</span> - {@html prequelAiringTime(prequel)} + {#await fetch(`/api/subsplease?tz=${Intl.DateTimeFormat().resolvedOptions().timeZone}`).then( (r) => r.json() )} + Loading ... + {:then subsPlease} + {@html prequelAiringTime(prequel, subsPlease)} + {/await} </li> {/each} </ul> |