diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index d2dad6d..ed6fa59 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -6,11 +6,12 @@ import QueueFrame from "$lib/components/custom/QueueFrame.svelte"; //import PlayerFrame from "$lib/components/custom/PlayerFrame.svelte"; import {Button} from "$lib/components/ui/button"; - import {browser} from "$app/environment"; - //let audioSource: HTMLAudioElement = $state(new Audio()); - //let paused: boolean = $derived(audioSource.paused); - //let volume: number = $derived(audioSource.volume); + function toFixedNumber(num, digits, base){ + const pow = Math.pow(base ?? 10, digits); + return Math.round(num*pow) / pow; + } + enum PlaybackMode { Linear, LoopOne, @@ -80,7 +81,6 @@ if (data && data.nowPlaying.entry) { data.nowPlaying.entry.forEach((entry) => { if (entry.username == OpenSubsonic.username) { - title = entry.title; newSong(entry); foundInNowPlaying = true; } @@ -234,8 +234,6 @@