1. 修复安卓部分机型顶部安全区遮挡回忆录标题的问题;
2. 降低封面图生成阈值和展示逻辑,独立封面图未生成时,使用正文图;
3. 去掉“嗯。”生硬回答,去掉不合理段首承接词;
4. 新增章节封面所需最少插图数的配置项
This commit is contained in:
yangshilin
2026-04-16 20:42:54 +08:00
parent 17b9fa3466
commit 9af2060259
15 changed files with 377 additions and 74 deletions

View File

@@ -18,6 +18,7 @@ from app.features.memoir.cover_eligibility import (
chapter_eligible_for_cover_by_inline_body_image_count,
chapter_has_story_links,
chapter_needs_cover_enqueue,
effective_chapter_markdown_for_cover_gates,
primary_chapter_memoir_image,
)
from app.features.memoir.models import Chapter, ChapterStoryLink
@@ -42,14 +43,13 @@ def _chapter_eligible_for_http_enqueue(chapter: Chapter | None) -> bool:
return False
if getattr(chapter, "cover_asset_id", None):
return False
md = (chapter.canonical_markdown or "").strip()
body = md or ""
if not body.strip():
return False
body = strip_image_placeholders(body).strip()
view = effective_chapter_markdown_for_cover_gates(chapter)
body = strip_image_placeholders(view).strip()
if not body:
return False
if not chapter_eligible_for_cover_by_inline_body_image_count(chapter):
if not chapter_eligible_for_cover_by_inline_body_image_count(
chapter, markdown=view
):
return False
cover_rec = primary_chapter_memoir_image(chapter)
if cover_rec and (cover_rec.status or "").strip() == "completed":
@@ -58,7 +58,7 @@ def _chapter_eligible_for_http_enqueue(chapter: Chapter | None) -> bool:
def _chapter_eligible_for_pipeline_enqueue(chapter: Chapter | None) -> bool:
"""尚无 cover_asset、正文插图数 > 3与 HTTP 闸门共用 chapter_needs_cover_enqueue 核心)。"""
"""尚无 cover_asset、正文插图数达 MEMOIR_MIN_INLINE_IMAGES_FOR_CHAPTER_COVER与 HTTP 闸门共用)。"""
return bool(chapter_needs_cover_enqueue(chapter))