Fix library thumbnails and let clips keep a display name.

Extract a poster frame when a still-thumb is missing, and show the clip name in the library with the prompt on the info icon.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-25 18:49:46 -05:00
co-authored by Cursor
parent b7196ecde3
commit 2913909199
11 changed files with 276 additions and 19 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ export default defineEventHandler((event) => {
throw createError({ statusCode: 404, statusMessage: 'Video file is missing' })
}
setHeader(event, 'Content-Type', 'video/mp4')
setHeader(event, 'Content-Disposition', `inline; filename="${clip.id}.mp4"`)
setHeader(event, 'Content-Disposition', `inline; filename="${safeDownloadName(clipTitle(clip))}.mp4"`)
setHeader(event, 'Cache-Control', 'private, max-age=3600')
return readFileSync(path)
})
+2 -1
View File
@@ -4,8 +4,9 @@ export default defineEventHandler(async (event) => {
const { owner } = assertLibraryOwner(event)
const folderId = library.folders.find(folder => folder.unlocked)?.id
if (folderId) await importMissingComfyVideos(owner, folderId)
await ensureClipThumbnails(owner)
} catch {
return library
return publicLibrary(event)
}
return publicLibrary(event)
})