연령제한 곡 재생: 유튜브가 퍼가기 플레이어에서 막는(오류 150) 연령제한 영상은 서버가 성인 인증된 계정 쿠키로 소리만 받아 두고(/data/audio, yt-dlp) 게임은 그 파일을 숨긴 <audio>로 재생. 찾기는 소리 크기·하이라이트 수집(로그인 없는 페이지의 성인 인증 화면) + 게임 중 오류 시 age-audio 작업이 다시 확인해 되돌림. 받기 전에는 출제 안 함. prepare·catchup에 videoId 대신 문제마다 새 무작위 주소(/api/audio/<토큰>, Range 지원)라 영상 id가 안 보임. 같은 시각 시작·위치 정지·새로고침 이어 듣기·소리 크기(유튜브 -14 보정 없이) 그대로. 관리자 수집 화면·cli age-audio, Dockerfile에 yt-dlp(버전·체크섬 고정), 수집 CLI가 서버 DB 경로를 물려받게(테스트가 기본 DB를 건드리던 것). 실제 크롬 e2e로 받은 음원+유튜브 곡 섞어 재생 확인

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-20 08:11:55 +09:00
parent 37c1440892
commit 4f888711b1
26 changed files with 705 additions and 45 deletions

View File

@@ -26,6 +26,11 @@ COPY --from=build /app/apps/server ./apps/server
COPY --from=build /app/apps/web/dist ./apps/web/dist
# Song seed for the collector (docs/07): bun apps/server/src/collector/cli.ts import-sta
COPY data/seed ./data/seed
# 연령제한 곡 (docs/08 §2-1): yt-dlp downloads their audio with the adult-verified cookie (bun solves YouTube's JS
# challenge). Pinned with its checksum; when YouTube breaks it, bump both from the release's SHA2-256SUMS.
ARG YTDLP_VERSION=2026.08.19
ADD --chmod=755 --checksum=sha256:58162f9bfdc27458ea47bfcb311cf47028f17d8154a8bf7d689861d46399230a \
https://github.com/yt-dlp/yt-dlp/releases/download/${YTDLP_VERSION}/yt-dlp_linux /usr/local/bin/yt-dlp
RUN mkdir -p /data && chown bun:bun /data
USER bun
VOLUME ["/data"]