feat: p2v 공유 페이지가 저장된 제목·설명을 우선 사용
This commit is contained in:
1 parent
81a554193c
commit
6890c7c2bb
2 files changed
+5
-2
No files matched your search
@@ -58,7 +58,9 @@ async def share_page(
|
||||
raise HTTPException(404, "공유 가능한 콘텐츠를 찾을 수 없습니다.")
|
||||
html = build_p2v_share_html(
|
||||
P2vShareData(ctype=ctype, content_id=row.id, poster_url=poster_of(ctype, row),
|
||||
name=row.name, description=narration_text_of(ctype, row)),
|
||||
name=row.name, title=getattr(row, "title", None),
|
||||
description=(getattr(row, "description", None)
|
||||
or narration_text_of(ctype, row))),
|
||||
share_url=resolve_share_url(
|
||||
request.headers,
|
||||
str(request.url).split("?", maxsplit=1)[0],
|
||||
|
||||
@@ -166,6 +166,7 @@ class P2vShareData:
|
||||
content_id: int
|
||||
poster_url: str | None
|
||||
name: str | None = None
|
||||
title: str | None = None
|
||||
description: str | None = None
|
||||
|
||||
|
||||
@@ -181,7 +182,7 @@ def build_p2v_share_html(
|
||||
return _build_share_html(
|
||||
detail_path=f"{path_prefix}/{data.content_id}",
|
||||
poster_url=data.poster_url,
|
||||
title=_share_title(data.name, fallback_title, fallback_store=fallback_title),
|
||||
title=_share_title(data.title or data.name, fallback_title, fallback_store=fallback_title),
|
||||
description=_share_description(data.description),
|
||||
share_url=share_url,
|
||||
frontend_base_url=frontend_base_url,
|
||||
|
||||
Reference in new issue
Block a user