fix(ui): fall back to backend source preview on recovery when media is missing
The save-side fix only helps sessions saved after it; already-recovered
sessions (and any older ones) had processingMedia=null and stayed null. On
recovery, when no media is stored, point the preview at /api/source/{jobId}
so existing upload sessions get their original-video preview back too.
This commit is contained in:
parent
97378ab102
commit
9693543f2d
1 changed files with 3 additions and 0 deletions
|
|
@ -293,7 +293,10 @@ function App() {
|
|||
if (session.jobId && session.status && session.status !== 'idle') {
|
||||
setJobId(session.jobId);
|
||||
setResults(session.results || null);
|
||||
// Restore the source preview. Older sessions (or uploads) saved no
|
||||
// media, so fall back to the backend-served source for this job.
|
||||
if (session.processingMedia) setProcessingMedia(session.processingMedia);
|
||||
else setProcessingMedia({ type: 'server', payload: `/api/source/${session.jobId}` });
|
||||
if (session.activeTab) setActiveTab(session.activeTab);
|
||||
// If was processing, resume polling; if complete/error, just show results
|
||||
setStatus(session.status === 'processing' ? 'processing' : session.status);
|
||||
|
|
|
|||
Loading…
Reference in a new issue