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:
@@ -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)
|
||||
})
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user