fix(test1): 短文案重试时补后缀,避免覆盖自定义模板
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e0d4a95c0c
commit
f226fb87ce
@ -491,6 +491,9 @@ class XClipsPipeline:
|
|||||||
caption = str(job.get("caption") or "").strip() or build_caption(job, cfg)
|
caption = str(job.get("caption") or "").strip() or build_caption(job, cfg)
|
||||||
bare = "".join(ch for ch in caption if not ch.isspace())
|
bare = "".join(ch for ch in caption if not ch.isspace())
|
||||||
if len(bare) < 8:
|
if len(bare) < 8:
|
||||||
|
suffix = "直播精彩瞬间"
|
||||||
|
caption = f"{caption} {suffix}".strip() if suffix not in caption else caption
|
||||||
|
if len("".join(ch for ch in caption if not ch.isspace())) < 8:
|
||||||
caption = build_caption(job, cfg)
|
caption = build_caption(job, cfg)
|
||||||
media_url = str(job.get("media_url") or "").strip()
|
media_url = str(job.get("media_url") or "").strip()
|
||||||
media_key = str(job.get("media_key") or "").strip()
|
media_key = str(job.get("media_key") or "").strip()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user