From 1c51fd32dbd58971047d548fbd46af468c9d4e82 Mon Sep 17 00:00:00 2001 From: Yuri Tatishchev Date: Thu, 5 Feb 2026 19:38:20 -0800 Subject: [PATCH] list page pt. 1 --- src/routes/list/+page.svelte | 340 +++++++++++++++++++++++++++++++++++ 1 file changed, 340 insertions(+) create mode 100644 src/routes/list/+page.svelte diff --git a/src/routes/list/+page.svelte b/src/routes/list/+page.svelte new file mode 100644 index 0000000..7ff25ee --- /dev/null +++ b/src/routes/list/+page.svelte @@ -0,0 +1,340 @@ + + +

MAL List → Songs

+ +

+ Enter a MAL username in the URL as /list?mal=USERNAME. This will fetch up to 20 anime from MAL (for now) and then query your local + client DB for related songs. +

+ +{#if status === "loading"} +

Loading…

+{:else if status === "error"} +

Error: {error}

+{:else if status === "ready"} +
+ + + (params.mal = (e.currentTarget as HTMLInputElement).value)} + autocomplete="off" + spellcheck={false} + /> + +
+ {#if !params.mal.trim()} + Waiting for username… + {:else} + {#if isLoadingMal} + Fetching MAL list… + {:else} + MAL entries: {malEntries.length} (limited to 20) + {/if} + {" • "} + {#if isLoadingDb} + Querying songs… + {:else} + Songs found: {songRows.length} + {/if} + {/if} +
+ + {#if malUsername} + + {/if} +
+ + {#if params.mal.trim() && !isLoadingMal && malEntries.length === 0} +

+ No anime returned from MAL (did you set a restrictive status/sort?). +

+ {/if} + + {#if params.mal.trim() && !isLoadingDb && malEntries.length > 0 && songRows.length === 0} +

+ No songs matched in the local database. This likely means none of the MAL + anime IDs exist in the snapshot DB. +

+ {/if} + + {#if songRows.length > 0} +

Songs

+ + + {/if} + + {#if malResponse?.paging?.next} +

+ More results exist on MAL, but pagination is not wired yet. +

+ {/if} +{/if}