fix: limit playback wait to restores

This commit is contained in:
vicrodh committed 2026-01-13 16:56:51 -06:00
1 parent a86dc5bcba
commit 879d6d9435
2 files changed
+12 -4

No files matched your search

+7 -2
View File
@@ -34,6 +34,7 @@ export interface PlayTrackOptions {
isLocal?: boolean;
showLoadingToast?: boolean;
showSuccessToast?: boolean;
playbackStartTimeoutMs?: number;
}
export interface MediaMetadata {
@@ -66,9 +67,13 @@ export async function playTrack(
track: PlayingTrack,
options: PlayTrackOptions = {}
): Promise<boolean> {
const { isLocal = false, showLoadingToast = true, showSuccessToast = true } = options;
const {
isLocal = false,
showLoadingToast = true,
showSuccessToast = true,
playbackStartTimeoutMs = 6000
} = options;
const shouldAwaitPlayback = showLoadingToast && !isCasting();
const playbackStartTimeoutMs = 25000;
// Set current track in store
setCurrentTrack(track);