mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 22:14:50 +00:00
feat(core): export comments to FCP, Premiere, Media Composer, and Resolve (#400)
* feat(core): export comments to FCP, Premiere, Media Composer, and Resolve Add backend support to export video comments matching Frame.io export capabilities: - DaVinci Resolve (.edl): CMX 3600 EDL with ResolveColorPurple markers and reply threading - Avid Media Composer (.xml): OMFI StreamItems XML with TC1 / V1 track allocation and sequential frame positioning - Adobe Premiere Pro (.xml): FCP7 XML sequence with dual marker placement on sequence and generatoritem - Final Cut Pro 10.4.0+ (.fiojson): Flattened JSON schema with frame, timestamp, and annotation serialization Includes DTO schema validation, AssetService export method, API route (GET /files/:fileId/comments/export), SMPTE drop-frame timecode calculations, unit tests, golden master tests, service integration tests, and API endpoint tests. * test(core): move comments export test fixtures to test directory * fix(core): escape asset name in Premiere XML, align Resolve FCM, and support CJK - Escape XML special characters in <name> tag for Premiere Pro XML sequence - Harmonize Resolve EDL FCM header and emitted timecodes using getEffectiveDropFrame - Use RFC 5987 / RFC 6266 buildContentDisposition for CJK filenames in download headers - Add test coverage for CJK filenames, comments, and author names across all 4 NLE formats * fix(core): implement timezone-aware comment exports and sanitize resolve edl
This commit is contained in:
@@ -339,3 +339,30 @@ export const getDownloadLinksResponseSchema = z.object({
|
||||
files: z.array(downloadLinkItemSchema),
|
||||
})
|
||||
export type GetDownloadLinksResponse = z.infer<typeof getDownloadLinksResponseSchema>
|
||||
|
||||
export const commentExportFormatSchema = z.enum([
|
||||
'fcp-fiojson',
|
||||
'media-composer-xml',
|
||||
'premiere-xml',
|
||||
'resolve-edl',
|
||||
])
|
||||
export type CommentExportFormat = z.infer<typeof commentExportFormatSchema>
|
||||
|
||||
export const exportCommentsQuerySchema = z.object({
|
||||
format: commentExportFormatSchema,
|
||||
timeZone: z
|
||||
.string()
|
||||
.refine(
|
||||
(tz) => {
|
||||
try {
|
||||
Intl.DateTimeFormat(undefined, { timeZone: tz })
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
},
|
||||
{ message: 'Invalid IANA time zone identifier' },
|
||||
)
|
||||
.optional(),
|
||||
})
|
||||
export type ExportCommentsQuery = z.infer<typeof exportCommentsQuerySchema>
|
||||
|
||||
Reference in New Issue
Block a user