Skip to main content

Local Runbook — C:\Users\omar\radionew

Everything the operator does on the local (Windows) node.

Services to run

ServiceCommandPort
Control plane (server.js)node server.js5000
Content pipelinenode scripts/run-content-pipeline.js …
Schedulernode smart-scheduler.js (or via pipeline)
Next.js player (dev)npm run dev -- -p 3456 in radio-web/3456
MCP agent servernode mcp-radio.js (stdio; connect as MCP server)

server.js mounts the control modules automatically: social platform (/api/social/*), station control (/api/station/*), and the live manager (/api/station/live/*). It reads station-config.json on boot and re-applies persisted config. See Server overview.

Daily sequence

  1. Serve the control plane — start server.js. This brings up the API, Socket.io, and the classic pages.
  2. Run content — fetch/process new music:
    node scripts/run-content-pipeline.js --songs=20 --sweepers
    Add --no-fetch to only process what is already downloaded.
  3. Sync — the engine syncs playlists/media to the production node during the run. For a full refresh:
    node scripts/sync-media-full.js
  4. Verify — check /api/content/status, /api/status, and the monitor page.

Metadata repair (as needed)

node scripts/reprobe_registry.js # rebuild registry from file tags
node scripts/sanitize_registry.js # clean artist/title in registry
node scripts/retag_files.js # write clean tags back into files

Config

  • Tool paths (ffmpeg/ffprobe/fpcalc/yt-dlp) come from environment overrides (FFMPEG_PATH, FPCALC_PATH, YTDLP_PATH); defaults are Windows paths.
  • All roots come from paths.js (media on E:/radionew).

Troubleshooting

  • Scheduler stalls: check the music category has ≥15 tracks (the safety fallback supplements thin categories from arabic_hits).
  • Downloads failing: verify network + yt-dlp (run node scripts/test-youtube-fetch.js).
  • Sync failing: confirm 10.10.8.230 is up and SSH as sms works; the engine retries 3× and logs the failure otherwise.