fix(playback): avoid restore wait on normal play

This commit is contained in:
vicrodh committed 2026-01-13 17:35:19 -06:00
1 parent e1de9235cf
commit 10eb06c928
1 file changed
+3 -1
+3 -1
View File
@@ -34,6 +34,7 @@ export interface PlayTrackOptions {
isLocal?: boolean; isLocal?: boolean;
showLoadingToast?: boolean; showLoadingToast?: boolean;
showSuccessToast?: boolean; showSuccessToast?: boolean;
awaitPlaybackStart?: boolean;
playbackStartTimeoutMs?: number; playbackStartTimeoutMs?: number;
} }
@@ -71,9 +72,10 @@ export async function playTrack(
isLocal = false, isLocal = false,
showLoadingToast = true, showLoadingToast = true,
showSuccessToast = true, showSuccessToast = true,
awaitPlaybackStart = false,
playbackStartTimeoutMs = 6000 playbackStartTimeoutMs = 6000
} = options; } = options;
const shouldAwaitPlayback = showLoadingToast && !isCasting(); const shouldAwaitPlayback = awaitPlaybackStart && !isCasting();
// Set current track in store // Set current track in store
setCurrentTrack(track); setCurrentTrack(track);