pre-cache optional mix/ files

Hunter
Tuesday, December 30th, 2025 at 7:25 PM

generate_manifests.py+19-13

generate_manifests.py
150  	print("✓ Generated manifest.json")
151  
152  	# Generate resource-manifest.json
153 +	static_files = [
154 +		"./",
155 +		"index.html",
156 +		"resources/styles.css",
157 +		"resources/script.js",
158 +		"mix/tracks.json",
159 +		"resources/icon.png",
160 +		"resources/play.png",
161 +		"resources/pause.png",
162 +		"resources/prev.png",
163 +		"resources/next.png",
164 +	]
165 +
166 +	# Conditionally include optional files if they exist
167 +	for optional_file in ["album_art.jpg", "custom.css", "custom.js"]:
168 +		if (SCRIPT_DIR / "mix" / optional_file).exists():
169 +			static_files.append(f"mix/{optional_file}")
170 +
171  	resource_manifest = {
    -		"static_files": [
    -			"./",
    -			"index.html",
    -			"resources/styles.css",
    -			"resources/script.js",
    -			"mix/tracks.json",
    -			"resources/icon.png",
    -			"resources/play.png",
    -			"resources/pause.png",
    -			"resources/prev.png",
    -			"resources/next.png",
    -			"mix/album_art.jpg"
    -		],
172 +		"static_files": static_files,
173  		"tracks": [f"mix/{track['filename']}" for track in tracks]
174  	}
175