Merge branch 'main' into feature/scheduler
# Conflicts: # solution/backend/services/build_service.py
This commit is contained in:
commit
6760b38fec
167 files changed
+7753
-5
No files matched your search
@@ -954,6 +954,25 @@ def to_site_payload(place, snapshot: dict, site, version, links) -> dict:
|
||||
# ★ 없는 것을 지어내지 않는다 — 틀린 경로 안내는 방문자에게 헛걸음을 만든다(모델 주석).
|
||||
# 렌더러는 비면 해당 섹션을 그리지 않는다.
|
||||
"routes": [],
|
||||
# ★ 이 숙소의 노래. `audioUrl` 은 **우리 쪽 경로**다 — Suno 가 준 주소는 만료되므로
|
||||
# 파일을 받아 두고(song_service) 프리렌더가 사이트 디렉토리로 복사한 것을 가리킨다.
|
||||
# 경로를 여기서 만드는 이유: 발행본의 주소 규칙(basePath + /s/<slug>)을 아는 곳이 여기다.
|
||||
"songs": [
|
||||
{
|
||||
"songId": row["song_id"],
|
||||
"title": row["title"],
|
||||
"lyrics": row.get("lyrics") or None,
|
||||
"style": row.get("style") or None,
|
||||
"durationSec": row.get("duration_sec"),
|
||||
# 프리렌더가 복사해 놓을 자리. 파일명은 그대로 쓴다.
|
||||
# basePath 자체가 이미 `/s/<slug>`(또는 서브패스 마운트라면 그 앞에 접두어)다.
|
||||
"audioUrl": f"{target['basePath']}/{row['file_name']}",
|
||||
# 프리렌더가 원본을 찾을 때 쓰는 이름(솔루션 밖으로는 안 나간다).
|
||||
"fileName": row["file_name"],
|
||||
}
|
||||
for row in (snapshot.get("songs") or [])
|
||||
if (row.get("file_name") or "").strip()
|
||||
],
|
||||
"narrative": narrative,
|
||||
"theme": theme,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user