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 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user