Stop ghost extension clips and recover last-frame extract after an interrupt.

Only one Comfy finish path can save a clip, hide catalog entries whose MP4 is missing, and retry last-frame extract so a truncated file does not dump FFmpeg noise into the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-26 11:34:44 -05:00
co-authored by Cursor
parent db8c9aabba
commit 551c29a62a
8 changed files with 201 additions and 125 deletions
+4 -3
View File
@@ -702,6 +702,7 @@ interface LibraryClip {
seed: number
hideThumbnail: boolean
hasThumbnail?: boolean
hasVideo?: boolean
createdAt: number
cfg?: number
fps?: number
@@ -950,7 +951,7 @@ const plannedChain = computed(() => {
]
})
const visibleClips = computed(() => clips.value.filter(clip => clip.folderId === browseFolderId.value))
const visibleClips = computed(() => clips.value.filter(clip => clip.folderId === browseFolderId.value && clip.hasVideo !== false))
const libraryGroups = computed(() => {
const groups = new Map<string, LibraryClip[]>()
for (const clip of visibleClips.value) {
@@ -974,9 +975,9 @@ function clipsIn(id: string) {
}
function clipFamilyKey(clip: LibraryClip) {
if (clip.familyId) return clip.familyId
const base = String(clip.name || '').trim().replace(/\s+p\d+$/i, '')
if (base) return `name:${clip.folderId}:${base.toLowerCase()}`
if (clip.familyId) return clip.familyId
return `solo:${clip.id}`
}
@@ -985,7 +986,7 @@ function sortClipParts(a: LibraryClip, b: LibraryClip) {
if (durationDelta) return durationDelta
const chainDelta = (b.chainIndex || 0) - (a.chainIndex || 0)
if (chainDelta) return chainDelta
return b.createdAt - a.createdAt
return a.createdAt - b.createdAt
}
function formatClipDuration(value?: number) {