가사 템플릿 업데이트, 폰트 선택 기능 추가, 주소 injection업데이트

This commit is contained in:
dhlim committed 2026-02-04 10:28:47 +00:00
1 parent 9d92b5d42c
commit 32c6c210a0
3 files changed
+57 -17

No files matched your search

+11 -2
View File
@@ -201,6 +201,7 @@ async def generate_video(
detail=f"task_id '{task_id}'에 해당하는 Project를 찾을 수 없습니다.",
)
project_id = project.id
store_address = project.detail_region_info
# ===== 결과 처리: Lyric =====
lyric = lyric_result.scalar_one_or_none()
@@ -211,6 +212,7 @@ async def generate_video(
detail=f"task_id '{task_id}'에 해당하는 Lyric을 찾을 수 없습니다.",
)
lyric_id = lyric.id
lyric_language = lyric.language
# ===== 결과 처리: Song =====
song = song_result.scalar_one_or_none()
@@ -313,6 +315,7 @@ async def generate_video(
image_url_list=image_urls,
lyric=lyrics,
music_url=music_url,
address=store_address
)
logger.debug(f"[generate_video] Modifications created - task_id: {task_id}")
@@ -333,8 +336,6 @@ async def generate_video(
f"[generate_video] Duration extended to {creatomate_service.target_duration}s - task_id: {task_id}"
)
# 이런거 추가해야하는데 AI가 자꾸 번호 달면 제가 번호를 다 밀어야 하나요?
song_timestamp_result = await session.execute(
select(SongTimestamp).where(
SongTimestamp.suno_audio_id == song.suno_audio_id
@@ -350,6 +351,13 @@ async def generate_video(
f"[generate_video] timestamp[{i}]: lyric_line={ts.lyric_line}, start_time={ts.start_time}, end_time={ts.end_time}"
)
match lyric_language:
case "English" :
lyric_font = "Noto Sans"
# lyric_font = "Pretendard" # 없어요
case _ :
lyric_font = "Noto Sans"
# LYRIC AUTO 결정부
if (creatomate_settings.DEBUG_AUTO_LYRIC):
auto_text_template = creatomate_service.get_auto_text_template()
@@ -363,6 +371,7 @@ async def generate_video(
aligned.lyric_line,
aligned.start_time,
aligned.end_time,
lyric_font
)
final_template["source"]["elements"].append(caption)
# END - LYRIC AUTO 결정부