fix(video-splice): 拼接运行中延后删除失败占位卡片
This commit is contained in:
1 parent
970e5993e3
commit
c405edb58a
2 files changed
+14
-6
No files matched your search
@@ -2073,6 +2073,7 @@
|
||||
authHeader,
|
||||
taskIds: [],
|
||||
placeholders: new Map(),
|
||||
failedPlaceholders: new Set(),
|
||||
sources: new Set(),
|
||||
pendingRejects: new Set(),
|
||||
};
|
||||
@@ -2132,10 +2133,7 @@
|
||||
successCount += 1;
|
||||
} catch (singleErr) {
|
||||
if (item) {
|
||||
const completed = String(item.dataset.completed || '0') === '1';
|
||||
if (!completed) {
|
||||
removePreviewItem(item);
|
||||
}
|
||||
spliceRun.failedPlaceholders.add(item);
|
||||
}
|
||||
if (String(singleErr && singleErr.message || '') === 'edit_cancelled') {
|
||||
return;
|
||||
@@ -2148,11 +2146,21 @@
|
||||
return;
|
||||
}
|
||||
const missItem = spliceRun.placeholders.get(taskId) || null;
|
||||
if (missItem) removePreviewItem(missItem);
|
||||
if (missItem) spliceRun.failedPlaceholders.add(missItem);
|
||||
})
|
||||
);
|
||||
await Promise.allSettled(waitTasks);
|
||||
await processChain;
|
||||
if (spliceRun.failedPlaceholders && spliceRun.failedPlaceholders.size) {
|
||||
spliceRun.failedPlaceholders.forEach((item) => {
|
||||
if (!item) return;
|
||||
const completed = String(item.dataset.completed || '0') === '1';
|
||||
if (!completed) {
|
||||
removePreviewItem(item);
|
||||
}
|
||||
});
|
||||
spliceRun.failedPlaceholders.clear();
|
||||
}
|
||||
|
||||
if (spliceRun.cancelled) {
|
||||
throw new Error('edit_cancelled');
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
<script src="/static/common/js/pwa.js?v=0.1.1"></script>
|
||||
<script src="/static/vendor/ffmpeg/ffmpeg.js?v=0.1.0"></script>
|
||||
<script src="/static/vendor/ffmpeg/ffmpeg-util.js?v=0.1.0"></script>
|
||||
<script src="/static/public/js/video.js?v=0.5.26"></script>
|
||||
<script src="/static/public/js/video.js?v=0.5.27"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in new issue
Block a user