set page title from manifest

Hunter
Tuesday, November 11th, 2025 at 12:11 AM

readme.md+4-1
script.js+5 

readme.md
31  ## quickstart
32  1. **add your .mp3 files** to the `/tracks` directory
33  	- you can do this manually or run `rip.py` to rip tracks from a physical CD
34 +
35  2. **give it a listen**
36  	- run `scan.py` to parse the contents of `/tracks` and populate `tracks.json`, which defines the songs available to the player. after running `scan.py` once, you can manually edit `tracks.json` to refine your mix.
37  	- run `host.py` to start a local HTTP server for testing. scan the QR code printed to the terminal to test the app from any device on your local network.
38  
39  3. **build the PWA**
   -	- run `generate_manifests.py` and follow the interactive prompts to specify an app name and the remote server path where your app will be hosted. this generates:
40 +	- run `generate_manifests.py` and follow the interactive prompts to specify an app name and the remote server path where your app will be hosted. this creates:
41  		- `manifest.json` (PWA configuration file)
42  		- `resource-manifest.json` (defines the files to be cached for offline use)
43  		- `service-worker.js` (manages offline caching)
44  	- optionally, add an `album_art.jpg` to `/resources`. it'll be used as the cover for your mix when playing on supported devices.
45 +
46  4. **deploy your mixapp**
47  	- upload the entire project directory to any web host with HTTPS support (GitHub Pages, AWS S3, etc.)
48 +
49  5. **install on your device**
50  	- visit the hosted URL and follow your browser's prompts to "install" or "add app to home screen" (detailed instructions <a href="https://hunterirving.github.io/web_workshop/pwa">here</a>)
51  	- once installed, the app works completely offline and behaves like a native application<br><br>
script.js
54  		CACHE_NAME = manifest.cache_name || manifest.name;
55  		console.log('Using cache name:', CACHE_NAME);
56  
57 +		// Set page title from manifest
58 +		if (manifest.name) {
59 +			document.title = manifest.name;
60 +		}
61 +
62  		// Now that we have CACHE_NAME, load tracks
63  		return fetch('tracks/tracks.json');
64  	})