feat: P2V 파이프라인 연동 및 좋아요·댓글·공유 지원
- 무빙 포스터(p2v_video)·롱컷(p2v_playreel) 파이프라인과 워커, 갤러리·내 콘텐츠 노출 - 좋아요·댓글: comment/video_reaction에 p2v_playreel_id 추가, 종류별 CHECK 확장 - P2V 소프트 삭제(is_deleted), queued/running 삭제 차단 - 공개 상세·공유 OG 페이지 추가 - 삭제된 부모 댓글이 목록에서 사라지던 has_live_reply 서브쿼리 버그 수정 - 마이그레이션: migration_2026-10-15_p2v_reactions.sql
This commit is contained in:
1 parent
bb1ea12958
commit
b16d4a8f1b
126 files changed
+6921
-62
No files matched your search
@@ -0,0 +1,36 @@
|
||||
"""⑥ narration — 롱컷 나레이션 7문장.
|
||||
|
||||
축제 3문장이 VLM 생성인 것과 달리 여기는 meta에서 채우는 고정 슬롯이다.
|
||||
캐스팅 스케줄 문장은 예매 전에 확인하는 정보라 빠지면 안 된다.
|
||||
"""
|
||||
from app.p2v.schemas.cast import CastExtraction
|
||||
from app.p2v.schemas.narration_slots import NARRATION_SLOTS, NarrationLine, SlotNarration
|
||||
from app.p2v.schemas.nol import NolMeta
|
||||
|
||||
MAX_CAST_IN_LINE = 3
|
||||
DEFAULT_GENRE = "공연"
|
||||
|
||||
|
||||
def period_text(meta: NolMeta) -> str:
|
||||
start, end = meta.play_start_date or "", meta.play_end_date or ""
|
||||
period = f"{start} ~ {end}".strip(" ~") if (start or end) else ""
|
||||
return period.replace("-", ".")
|
||||
|
||||
|
||||
def build_narration(meta: NolMeta, cast: CastExtraction | None = None) -> SlotNarration:
|
||||
title = meta.goods_name or ""
|
||||
names = "·".join((cast.names if cast else [])[:MAX_CAST_IN_LINE])
|
||||
date_text = period_text(meta)
|
||||
place = meta.place_name or ""
|
||||
|
||||
texts = [
|
||||
f"{title}, 무대에서 만나세요.",
|
||||
"포스터가 움직이기 시작합니다.",
|
||||
f"{meta.genre_name or DEFAULT_GENRE}의 한 장면을 미리 봅니다.",
|
||||
f"{names} 출연." if names else "출연진을 상세페이지에서 확인하세요.",
|
||||
"캐스팅 스케줄은 상세페이지에서 확인하세요.",
|
||||
f"{date_text} {place}".strip() + ".",
|
||||
"지금 예매하세요.",
|
||||
]
|
||||
return SlotNarration(lines=[NarrationLine(slot=slot, text=text)
|
||||
for slot, text in zip(NARRATION_SLOTS, texts, strict=True)])
|
||||
Reference in new issue
Block a user