Fix audio autoplay crash from loading spinner state mismatch
Summary
-
startFadeInwas settingplayingFileIdin an async.then()callback whileloadingFileIdwas set synchronously, causingcurrentTrackto beundefinedwhen Svelte resolved the template — triggering the "payload" error - Set
playingFileIdsynchronously (matchingplayTrackbehavior), add missingonTrackStartcall for scrobble tracking, and clear state on autoplay block
Test plan
-
Open random page — album auto-plays first track with spinner during load -
If autoplay is browser-blocked, no spinner persists and no console error -
Click Skip — crossfade works correctly -
Manually clicking a track still works -
Build passes