Merge branch '108' of https://github.com/HBAI-Ltd/Toonflow-app into 108
This commit is contained in:
commit
b32017d669
@ -29,7 +29,8 @@ export default router.post(
|
|||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { scriptId, projectId, storyboardId, prompt, data, model, duration, resolution, audio, mode } = req.body;
|
const { scriptId, projectId, storyboardId, prompt, data, model, duration, resolution, audio, mode } = req.body;
|
||||||
|
//获取生成视频比例
|
||||||
|
const ratio = await u.db("o_project").select("videoRatio").where("id", projectId).first();
|
||||||
const videoPath = `/${projectId}/video/${uuidv4()}.mp4`; //视频保存路径
|
const videoPath = `/${projectId}/video/${uuidv4()}.mp4`; //视频保存路径
|
||||||
//新增
|
//新增
|
||||||
const videoData = {
|
const videoData = {
|
||||||
@ -109,6 +110,7 @@ export default router.post(
|
|||||||
imageBase64: base64.filter((item) => item !== null) as string[],
|
imageBase64: base64.filter((item) => item !== null) as string[],
|
||||||
mode,
|
mode,
|
||||||
duration,
|
duration,
|
||||||
|
aspectRatio: (ratio?.videoRatio as `${number}:${number}`) || "16:9",
|
||||||
resolution,
|
resolution,
|
||||||
audio,
|
audio,
|
||||||
taskClass: "视频生成",
|
taskClass: "视频生成",
|
||||||
|
|||||||
@ -14,7 +14,6 @@ export default router.post(
|
|||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { scriptId, specifyIds } = req.body;
|
const { scriptId, specifyIds } = req.body;
|
||||||
const data = await u.db("o_video").where("scriptId", scriptId).whereIn("id", specifyIds).andWhere("state", "生成中").select("*");
|
const data = await u.db("o_video").where("scriptId", scriptId).whereIn("id", specifyIds).andWhere("state", "生成中").select("*");
|
||||||
console.log("%c Line:17 🧀 data", "background:#93c0a4", data.length);
|
|
||||||
res.status(200).send(success(data));
|
res.status(200).send(success(data));
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -30,6 +30,7 @@ export default function runCode(code: string) {
|
|||||||
urlToBase64,
|
urlToBase64,
|
||||||
mergeImages,
|
mergeImages,
|
||||||
pollTask,
|
pollTask,
|
||||||
|
fetch,
|
||||||
exports,
|
exports,
|
||||||
axios,
|
axios,
|
||||||
FormData,
|
FormData,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user