cache non-audio files in /mix (fonts, images, etc.)

Hunter
Wednesday, April 29th, 2026 at 7:04 PM

build.py+10-4

build.py
175  		"resources/repeat.svg",
176  	]
177  
    -	# Conditionally include optional files if they exist
    -	for optional_file in ["album_art.jpg", "custom.css", "custom.js"]:
    -		if (SCRIPT_DIR / "mix" / optional_file).exists():
    -			static_files.append(f"mix/{optional_file}")
178 +	AUDIO_EXTS = {".mp3", ".m4a", ".ogg", ".flac", ".wav"}
179 +	SKIP_NAMES = {"tracks.json", "readme.md"}
180 +	for path in sorted((SCRIPT_DIR / "mix").iterdir()):
181 +		if not path.is_file():
182 +			continue
183 +		if path.name in SKIP_NAMES:
184 +			continue
185 +		if path.suffix.lower() in AUDIO_EXTS:
186 +			continue
187 +		static_files.append(f"mix/{path.name}")
188  
189  	static_files_js = json.dumps(static_files)
190