Fixed audio api endpoint, media player mostly functional
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user