diff options
| author | Fuwn <[email protected]> | 2026-06-05 13:58:43 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-06-05 13:58:43 +0000 |
| commit | 83879a0fa01415999116cbc46377b4819fc19f96 (patch) | |
| tree | a15d2870b29f727923b2dcdc3b5f017dd4575407 /src/routes | |
| parent | fix(schedule): use masonry columns so day panels collapse cleanly (diff) | |
| download | due.moe-83879a0fa01415999116cbc46377b4819fc19f96.tar.xz due.moe-83879a0fa01415999116cbc46377b4819fc19f96.zip | |
feat(schedule): add native track alongside sub and dub
Source the native (original-language) broadcast schedule from AnimeSchedule's "raw" airType and expose it as a third track on the schedule-page toggle and the GraphQL airing query.
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/+layout.svelte | 4 | ||||
| -rw-r--r-- | src/routes/api/animeschedule/+server.ts | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index be594460..fbc2ff8e 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -289,7 +289,9 @@ $: { fetch(root("/api/animeschedule")) .then((r) => r.json()) .then((r) => airingSchedule.set(r)) - .catch(() => airingSchedule.set({ generatedAt: 0, sub: [], dub: [] })); + .catch(() => + airingSchedule.set({ generatedAt: 0, native: [], sub: [], dub: [] }), + ); } </script> diff --git a/src/routes/api/animeschedule/+server.ts b/src/routes/api/animeschedule/+server.ts index c596bf41..75257569 100644 --- a/src/routes/api/animeschedule/+server.ts +++ b/src/routes/api/animeschedule/+server.ts @@ -8,14 +8,14 @@ export const GET = async () => { if (!token) return Response.json( - { generatedAt, sub: [], dub: [] }, + { generatedAt, native: [], sub: [], dub: [] }, { headers: appOriginHeaders({ "Cache-Control": "max-age=60" }) }, ); - const { sub, dub } = await fetchTimetables(token); + const { native, sub, dub } = await fetchTimetables(token); return Response.json( - { generatedAt, sub, dub }, + { generatedAt, native, sub, dub }, { headers: appOriginHeaders({ "Cache-Control": "max-age=86400, s-maxage=86400", |