WIP: global player refactor pt. 1
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { invalidate } from "$app/navigation";
|
||||
import SongEntry from "$lib/components/SongEntry.svelte";
|
||||
import { db as clientDb } from "$lib/db/client-db";
|
||||
import { addAllToQueue, playAllNext } from "$lib/player/player.svelte";
|
||||
import { player } from "$lib/player/store.svelte";
|
||||
import { trackFromSongRow } from "$lib/player/types";
|
||||
import { seasonName } from "$lib/utils/amq";
|
||||
import type { PageData } from "./$types";
|
||||
@@ -42,11 +42,11 @@
|
||||
}
|
||||
|
||||
function queueAll() {
|
||||
addAllToQueue(playableTracks());
|
||||
player.addAll(playableTracks());
|
||||
}
|
||||
|
||||
function playAllNextFromAnime() {
|
||||
playAllNext(playableTracks());
|
||||
player.playAllNext(playableTracks());
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -57,14 +57,16 @@
|
||||
{#if !data.annId}
|
||||
<h1 class="text-2xl font-semibold">Anime not found</h1>
|
||||
<p class="mt-2 text-sm text-muted-foreground">
|
||||
The requested anime entry doesn’t exist (or the route param wasn’t a valid
|
||||
ANN id).
|
||||
The requested anime entry doesn’t exist (or the route param wasn’t a
|
||||
valid ANN id).
|
||||
</p>
|
||||
{:else if !data.animeWithSongs}
|
||||
<p class="mt-3 text-sm text-muted-foreground">Loading anime…</p>
|
||||
{:else}
|
||||
<header class="mt-2 space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{data.animeWithSongs.anime.mainName}</h1>
|
||||
<h1 class="text-2xl font-semibold">
|
||||
{data.animeWithSongs.anime.mainName}
|
||||
</h1>
|
||||
|
||||
<p class="text-sm text-muted-foreground">
|
||||
{data.animeWithSongs.anime.year}
|
||||
|
||||
Reference in New Issue
Block a user