Skip to content

Commit e83c960

Browse files
committed
fix(build): Ensure assets/sounds directory exists before copying audio files
1 parent 03cb99f commit e83c960

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

build_web.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ def clean_build_dir(self):
3030

3131
def copy_assets(self):
3232
"""Copy static assets to build directory"""
33+
# Create subdirectories first
34+
sounds_dir = self.assets_dir / "sounds"
35+
sounds_dir.mkdir(exist_ok=True)
36+
3337
# Copy static GIF
3438
src_static = Path("src/assets/tvstatic.gif")
3539
if src_static.exists():
@@ -41,16 +45,9 @@ def copy_assets(self):
4145
shutil.copy2(src_wormhole, self.assets_dir / "wormhole.mp4")
4246
print("✅ Copied wormhole.mp4")
4347

44-
src_wormhole_audio = Path("src/assets/sounds/wormhole.mp3")
45-
if src_wormhole_audio.exists():
46-
shutil.copy2(src_wormhole_audio, self.assets_dir / "sounds" / "wormhole.mp3")
47-
print("✅ Copied wormhole.mp3")
48-
4948
# Copy sound effects
5049
src_sounds = Path("src/assets/sounds")
5150
if src_sounds.exists():
52-
sounds_dir = self.assets_dir / "sounds"
53-
sounds_dir.mkdir()
5451
for sound_file in src_sounds.glob("*.mp3"):
5552
shutil.copy2(sound_file, sounds_dir / sound_file.name)
5653
print("✅ Copied sound effects")

0 commit comments

Comments
 (0)