|
|
@@ -92,7 +92,7 @@ class AnimeService
|
|
|
$task_id = $task->id;
|
|
|
|
|
|
if (!$task_id) {
|
|
|
- Utils::throwError("20003: 角色({$role_name})生成图片失败");
|
|
|
+ Utils::throwError("20003:角色({$role_name})生成图片失败");
|
|
|
}
|
|
|
|
|
|
$role['task_id'] = $task_id;
|
|
|
@@ -144,7 +144,7 @@ class AnimeService
|
|
|
$task_id = $task->id;
|
|
|
|
|
|
if (!$task_id) {
|
|
|
- Utils::throwError("20003: 角色({$scene_name})生成图片失败");
|
|
|
+ Utils::throwError("20003:场景({$scene_name})生成图片失败");
|
|
|
}
|
|
|
|
|
|
$scene['task_id'] = $task_id;
|
|
|
@@ -277,7 +277,7 @@ class AnimeService
|
|
|
}
|
|
|
|
|
|
$episode = DB::table('mp_anime_episodes')->where('anime_id', $anime_id)->where('id', $episode_id)->select('id as episode_id', 'anime_id', 'episode_number', 'title', 'intro', 'art_style', 'roles', 'scenes')->first();
|
|
|
- if (!$episode) Utils::throwError('20003: 该剧集不存在!');
|
|
|
+ if (!$episode) Utils::throwError('20003:该剧集不存在!');
|
|
|
$episode = (array)$episode;
|
|
|
$episode['roles'] = json_decode($episode['roles'], true);
|
|
|
$episode['scenes'] = json_decode($episode['scenes'], true);
|
|
|
@@ -464,7 +464,7 @@ class AnimeService
|
|
|
$episodes = DB::table('mp_anime_episodes')->where('anime_id', $anime_id)->where('id', $episode_id)->select('anime_id', 'episode_number', 'sequence', 'title', 'intro', 'art_style', 'roles', 'scenes')->get()->map(function($value) {
|
|
|
return (array)$value;
|
|
|
})->toArray();
|
|
|
- if (!$episodes) Utils::throwError('20003: 该剧集不存在!');
|
|
|
+ if (!$episodes) Utils::throwError('20003:该剧集不存在!');
|
|
|
foreach($episodes as &$episode) {
|
|
|
$episode['version'] = 'V'.$episode['sequence'];
|
|
|
$episode['roles'] = json_decode($episode['roles'], true);
|
|
|
@@ -521,7 +521,7 @@ class AnimeService
|
|
|
|
|
|
$ratio = getProp($data, 'ratio');
|
|
|
if (!in_array($ratio, ['1:1', '4:3', '3:2', '16:9', '21:9'])) {
|
|
|
- Utils::throwError('1002:画面比例选择不正确,只支持1:1、4:3、3:2、16:9、21:9');
|
|
|
+ Utils::throwError('1002:画面比例选择不正确');
|
|
|
}
|
|
|
|
|
|
// 根据画面比例给宽高赋值
|
|
|
@@ -564,7 +564,7 @@ class AnimeService
|
|
|
$task_id = $task->id;
|
|
|
|
|
|
if (!$task_id) {
|
|
|
- Utils::throwError("20003: 生成图片失败");
|
|
|
+ Utils::throwError("20003:生成图片失败");
|
|
|
}
|
|
|
|
|
|
// 更新任务ID
|
|
|
@@ -625,7 +625,7 @@ class AnimeService
|
|
|
'episode_id' => $episode_id,
|
|
|
'error' => $e->getMessage()
|
|
|
]);
|
|
|
- Utils::throwError('20003:更新角色列表失败: ' . $e->getMessage());
|
|
|
+ Utils::throwError('20003:更新角色列表失败 ' . $e->getMessage());
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
@@ -676,7 +676,7 @@ class AnimeService
|
|
|
'episode_id' => $episode_id,
|
|
|
'error' => $e->getMessage()
|
|
|
]);
|
|
|
- Utils::throwError('20003:更新场景列表失败: ' . $e->getMessage());
|
|
|
+ Utils::throwError('20003:更新场景列表失败 ' . $e->getMessage());
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
@@ -722,7 +722,7 @@ class AnimeService
|
|
|
'segment_id' => $segment_id,
|
|
|
'error' => $e->getMessage()
|
|
|
]);
|
|
|
- Utils::throwError('20003:更新分镜剧本失败: ' . $e->getMessage());
|
|
|
+ Utils::throwError('20003:更新分镜剧本失败 ' . $e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -975,7 +975,7 @@ class AnimeService
|
|
|
$segment_content = getProp($data, 'segment_content');
|
|
|
$ratio = getProp($data, 'ratio');
|
|
|
if (!in_array($ratio, ['1:1', '4:3', '3:2', '16:9', '21:9'])) {
|
|
|
- Utils::throwError('1002:画面比例选择不正确,只支持1:1、4:3、3:2、16:9、21:9');
|
|
|
+ Utils::throwError('1002:画面比例选择不正确');
|
|
|
}
|
|
|
|
|
|
if (!$anime_id || !$episode_id) {
|
|
|
@@ -1159,7 +1159,7 @@ class AnimeService
|
|
|
$video_url = getProp($data, 'video_url');
|
|
|
$ratio = getProp($data, 'ratio');
|
|
|
if (!in_array($ratio, ['1:1', '4:3', '3:2', '16:9', '21:9'])) {
|
|
|
- Utils::throwError('1002:画面比例选择不正确,只支持1:1、4:3、3:2、16:9、21:9');
|
|
|
+ Utils::throwError('1002:画面比例选择不正确');
|
|
|
}
|
|
|
|
|
|
if (!$anime_id || !$episode_id) {
|
|
|
@@ -2640,7 +2640,7 @@ class AnimeService
|
|
|
'result_json' => $statusInfo['result_json'] ?? []
|
|
|
]);
|
|
|
|
|
|
- Utils::throwError('20003:图片生成失败: ' . ($statusInfo['error_message'] ?? '未知错误'));
|
|
|
+ Utils::throwError('20003:图片生成失败,' . ($statusInfo['error_message'] ?? '未知错误'));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -2655,7 +2655,7 @@ class AnimeService
|
|
|
'error' => $e->getMessage()
|
|
|
]);
|
|
|
|
|
|
- Utils::throwError('20003:更新失败: ' . $e->getMessage());
|
|
|
+ Utils::throwError('20003:' . $e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
}
|