Fixed audio api endpoint, media player mostly functional

This commit is contained in:
Eclypsed
2024-04-13 00:45:35 -04:00
parent faf3794c8f
commit 2ea07ba9fe
13 changed files with 214 additions and 251 deletions

View File

@@ -1,4 +1,5 @@
<script lang="ts">
import { currentlyPlaying } from '$lib/stores'
import type { PageServerData } from './$types'
export let data: PageServerData
@@ -7,7 +8,12 @@
{#if data.searchResults}
{#await data.searchResults then searchResults}
{#each searchResults as searchResult}
<div>{searchResult.name} - {searchResult.type}</div>
<button
on:click={() => {
if (searchResult.type === 'song') $currentlyPlaying = searchResult
}}
class="block bg-neutral-925">{searchResult.name} - {searchResult.type}</button
>
{/each}
{/await}
{/if}