fix: 统一视频自由创作标题

This commit is contained in:
hh
2026-07-13 21:53:15 +08:00
parent 3078271f97
commit 6131bcdd9d
7 changed files with 66 additions and 10 deletions
+3 -2
View File
@@ -89,6 +89,7 @@ function personMissingTri(asset: Asset): boolean {
}
function freeVideoToPack(asset: Asset): VideoPack {
const displayName = asset.display_name?.trim() || asset.name || "视频自由创作";
const files = asset.files || [];
const video = files.find((f) => f.is_primary && (f.content_type || "").startsWith("video/"))
|| files.find((f) => (f.content_type || "").startsWith("video/"));
@@ -96,9 +97,9 @@ function freeVideoToPack(asset: Asset): VideoPack {
|| files.find((f) => (f.content_type || "").startsWith("image/"));
return {
project_id: `free-video:${asset.id}`,
project_name: asset.name || "视频自由创作",
project_name: displayName,
product_cover: poster?.preview_url || "",
clips: [{ id: asset.id, name: asset.name || "视频", url: video?.preview_url || "" }]
clips: [{ id: asset.id, name: displayName, url: video?.preview_url || "" }]
};
}