두산 상설 응원가 특례 제거 — 전 팀 동일하게 오늘의 생성곡만

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jwkim 2026-08-27 10:03:03 +09:00
parent 579ab768bf
commit 9e8993c67a

View File

@ -17,14 +17,6 @@ export type Track = {
// 경로별 정적 플레이리스트 — 월드컵 종료로 비움 (구조는 특설 대비 유지)
export const PATH_PLAYLISTS: Record<string, Track[]> = {};
// 두산 베어스 응원가 — 특정 경기가 아니라 두산(OB) 전 경기 공통 적용
const DOOSAN_TRACKS: Track[] = [
{ title: "잠실의 곰들", artist: "aio2o", src: "/audio/잠실의 곰들.mp3", cover: "/thumbnail/잠실의 곰들.webp" },
{ title: "BEAR ATTACK", artist: "aio2o", src: "/audio/BEAR ATTACK.mp3", cover: "/thumbnail/BEAR ATTACK.webp" },
{ title: "잠실 G-Thang", artist: "aio2o", src: "/audio/잠실 G-Thang.mp3", cover: "/thumbnail/잠실 G-Thang.webp" },
{ title: "Bearz Day", artist: "aio2o", src: "/audio/Bearz Day.mp3", cover: "/thumbnail/Bearz Day.webp" },
];
// 경로 → 자동 로드 트랙 목록 — 정확일치(PATH_PLAYLISTS, 월드컵 특설)만.
// KBO 오늘의 응원가는 자동재생하지 않고 상세 페이지의 팀별 '응원가 듣기'
// 버튼(getTeamSongTracks)으로만 재생한다.
@ -71,15 +63,13 @@ function songToTracks(s: SongOut): Track[] {
}
// 특정 경기·팀의 오늘의 응원가 트랙 — 상세 페이지 '응원가 듣기' 버튼용.
// 두산(OB)은 상설 응원가를 뒤에 이어붙인다. 곡이 없으면 빈 배열.
// 전 팀 동일 로직(그날 생성곡만). 곡이 없으면 빈 배열.
export async function getTeamSongTracks(
matchId: string,
teamCode: string,
): Promise<Track[]> {
const songs = await fetchSongsCached();
const dyn = songs
return songs
.filter((s) => s.matchId === matchId && s.teamCode === teamCode)
.flatMap(songToTracks);
const fixed = teamCode === "OB" && matchId.startsWith("KBO_") ? DOOSAN_TRACKS : [];
return [...dyn, ...fixed];
}