From 4e76806cc35ba80bff3ca7681ec3f0e83bffd54d Mon Sep 17 00:00:00 2001 From: icarus Date: Mon, 13 Oct 2025 23:08:44 +0800 Subject: [PATCH] fix(video): prevent thumbnail update for queued/in_progress videos When a video is in 'queued' or 'in_progress' status, setting a thumbnail is not meaningful and could cause issues. This change ensures thumbnail remains undefined for these states. --- src/renderer/src/store/video.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/store/video.ts b/src/renderer/src/store/video.ts index 8a79f38625..7942cd26d5 100644 --- a/src/renderer/src/store/video.ts +++ b/src/renderer/src/store/video.ts @@ -39,7 +39,14 @@ const videoSlice = createSlice({ if (videos) { let video = videos.find((v) => v.id === update.id) if (video) { - video = { ...video, ...update } + switch (video.status) { + case 'queued': + case 'in_progress': + video = { ...video, ...update, thumbnail: undefined } + break + default: + video = { ...video, ...update } + } } else { logger.error(`Video with id ${update.id} not found in ${providerId}`) }