Airplay Live

User's Guide

User guide for Airplay Live

🛰️

Multi-station setup – Stations

How Airplay Live behaves when you run several stations (e.g. Main + Dance UK) on the same codebase.

📡 Station selector: shell.php decides which station is active (e.g. AP_STATION = nexplay | danceuk) and opens the matching MAIN / LSTN database pair for that station.
📊 Per-station trend logic: Trend values and listener graphs are always calculated from the station’s own listener table (for example listeners_danceuk in LSTN_DANCEUK.db).
🎧 Now-playing logger: Each station can have its own “now playing → tracks / plays” logger (e.g. tools/log_danceuk_play.php) which parses the Shoutcast songtitle, finds/creates the track, inserts a play row with source, and backfills duration + listener drop from that station’s listener history.
🔌 APIs & status: Public status endpoints (for example api/danceuk_listener_status.php) always serve data for the active station only, so widgets and external sites stay in sync with the correct channel.
💡 When adding a new station, follow the Dance UK pattern: new MAIN/LSTN databases, a dedicated listener poller, a per-station play logger and a small API wrapper.

See also: