From 623e82fb161d5b51dec965077dafaf1ec5a6c5a7 Mon Sep 17 00:00:00 2001 From: Mattias Tall Date: Tue, 26 May 2026 17:30:58 +0200 Subject: [PATCH] Fix player crash: remove premature pollForFile in handleDownloadAndPlay The unified effect already gates polling on dlStatus===complete, but handleDownloadAndPlay was still calling pollForFile immediately on click, before the download even started. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/pages/Watch.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/pages/Watch.jsx b/frontend/src/pages/Watch.jsx index e8dc555..072bf09 100644 --- a/frontend/src/pages/Watch.jsx +++ b/frontend/src/pages/Watch.jsx @@ -720,8 +720,7 @@ export default function Watch() { const handleDownloadAndPlay = useCallback(() => { setPlayRequested(true); downloadMut.mutate(); - pollForFile(`/files/${youtubeVideoId}.mp4`); - }, [downloadMut, pollForFile, youtubeVideoId]); + }, [downloadMut]); const saveProgress = useCallback((secs) => { if (!video?.id) return;