|
|
@@ -4449,9 +4449,7 @@ Q版卡通风格,头大身小,造型圆润可爱,线条简单,色彩明
|
|
|
|
|
|
if ($prompt == '确认分镜大纲') {
|
|
|
// 暂时保留
|
|
|
- // $content = $uploaded_content ?: $chapter_content;
|
|
|
- // 调整逻辑(直接使用全部内容生产第一集)
|
|
|
- $content = $full_content;
|
|
|
+ $content = $uploaded_content ?: $chapter_content;
|
|
|
if ($is_single) $content = $full_content; // 单剧集使用全文
|
|
|
if (!$content) {
|
|
|
Utils::throwError('20003:章节内容无法获取,请确认');
|
|
|
@@ -5035,6 +5033,9 @@ Q版卡通风格,头大身小,造型圆润可爱,线条简单,色彩明
|
|
|
if ($pic_prompt) $content .= '{'.$pic_prompt.'}';
|
|
|
$voice_name = trim(getProp($item, 'voice_name'));
|
|
|
if ($voice_name) $content .= '{{'.$voice_name.'}}';
|
|
|
+ }else {
|
|
|
+ $pic_prompt = trim(getProp($item, 'pic_prompt'));
|
|
|
+ if ($pic_prompt) $content .= '{'.$pic_prompt.'}';
|
|
|
}
|
|
|
$content .= "\n";
|
|
|
}
|
|
|
@@ -5893,8 +5894,8 @@ Q版卡通风格,头大身小,造型圆润可爱,线条简单,色彩明
|
|
|
// 根据章节标题来拆分章节内容,返回包含标题和内容的二维数组
|
|
|
$chapters = [];
|
|
|
|
|
|
- // 匹配不同格式的章节标题:###第X章、##第X章、第X章
|
|
|
- $pattern = '/^(#{0,3}\s*第[^章]*章[^\n]*)\n(.*?)(?=\n#{0,3}\s*第[^章]*章|\z)/ms';
|
|
|
+ // 匹配不同格式的章节标题:###第X章、##第X章、第X章、###第X集、##第X集、第X集
|
|
|
+ $pattern = '/^(#{0,3}\s*第[^章集]*[章集][^\n]*)\n(.*?)(?=\n#{0,3}\s*第[^章集]*[章集]|\z)/ms';
|
|
|
|
|
|
if (preg_match_all($pattern, $content, $matches, PREG_SET_ORDER)) {
|
|
|
foreach ($matches as $match) {
|