diff --git a/src/routes/assets/getAssetsApi.ts b/src/routes/assets/getAssetsApi.ts index 1573148..8910fbe 100644 --- a/src/routes/assets/getAssetsApi.ts +++ b/src/routes/assets/getAssetsApi.ts @@ -43,11 +43,19 @@ export default router.post( } const childAssets = await childQuery; + // 为每个子资产添加图片地址 + const childAssetsWithSrc = await Promise.all( + childAssets.map(async (child) => ({ + ...child, + src: child.filePath && (await u.oss.getFileUrl(child.filePath!)), + })), + ); + // 为每个父资产添加子资产 const result = await Promise.all( parentAssets.map(async (parent) => ({ ...parent, - sonAssets: childAssets.filter((child) => child.assetsId === parent.id), + sonAssets: childAssetsWithSrc.filter((child) => child.assetsId === parent.id), src: parent.filePath && (await u.oss.getFileUrl(parent.filePath!)), })), ); diff --git a/src/routes/production/workbench/generateVideo.ts b/src/routes/production/workbench/generateVideo.ts index bb62d46..3d82760 100644 --- a/src/routes/production/workbench/generateVideo.ts +++ b/src/routes/production/workbench/generateVideo.ts @@ -103,7 +103,6 @@ export default router.post( 3. 视频风格应与用户指定的模式数据相匹配,包括色彩、音乐、特效等元素。 4. 视频中应包含用户提供的图片,并在视频中适当展示,以增强视频的视觉效果。 5. 如果用户指定了音频,请确保视频中的音频与视频内容相匹配,符合用户的创意意图。`; - console.log("%c Line:110 🍑 prompt", "background:#b03734", prompt); const aiVideo = u.Ai.Video(model); await aiVideo.run( diff --git a/src/types/database.d.ts b/src/types/database.d.ts index 2a3bc57..0aca397 100644 --- a/src/types/database.d.ts +++ b/src/types/database.d.ts @@ -1,4 +1,4 @@ -// @db-hash 93b2462070c45c2b449e9a18c4e88763 +// @db-hash 6be0a80e9c8f541987a4c1e907736237 //该文件由脚本自动生成,请勿手动修改 export interface memories { @@ -178,6 +178,7 @@ export interface o_storyboard { 'sound'?: string | null; 'state'?: string | null; 'title'?: string | null; + 'videoPrompt'?: string | null; } export interface o_tasks { 'describe'?: string | null; @@ -211,6 +212,7 @@ export interface o_video { 'errorReason'?: string | null; 'filePath'?: string | null; 'id'?: number; + 'projectId'?: number | null; 'scriptId'?: number | null; 'state'?: string | null; 'storyboardId'?: number | null;