Jukebox Native Player 0.4.0
===========================
The player half of a Jukebox Native Streamer. Runs on any Linux computer with
MPD and a working audio output (Raspberry Pi is the reference build; any
Debian-family system such as Raspberry Pi OS, Debian, Ubuntu, DietPi or
Armbian works with install.sh, on ARM or x86).

Download and install
  Latest version, checksums and older versions: https://player.jukeboxjamz.com
  One step (downloads, checks the SHA-256 checksum, installs or upgrades):
    curl -fsSL https://player.jukeboxjamz.com/get.sh | sudo sh -s -- --controller <NAS IP>

Files
  app.py                  the player API (FastAPI)
  stream_recovery.py      the recovery watchdog
  requirements.txt        Python packages
  player.env.example      settings (API key, name, port)
  systemd/*.service       services for a new install
  install.sh              installer for a NEW player (sudo sh install.sh)
                          options: --controller <NAS IP>, --remote (IR remote listener)
  remote_control.py       IR remote listener (USB MCE/eHome receiver); edit its button table
  ir-setup.sh             turns on NEC decoding for the receiver at start

Upgrading an existing 0.1.0, 0.2.0 or 0.3.0 player
  Replace app.py and stream_recovery.py with these two files, in the same
  folder as your presets.db, then restart both services. Your presets, names,
  playback intent and API key are kept. New tables are added automatically.

What changed in 0.4.0
  Preset editing from Jukebox Jamz: DELETE /api/v1/presets/{id} and
  POST /api/v1/presets/order {"ids": [...]} (renumbers preset1..presetN,
  names kept). GET /api/v1/system reports the network interface, wired or
  Wi-Fi, IP, MAC, SSID, signal, uptime, CPU temperature and board model
  (read-only, no secrets), shown on More > Devices. Works without the "ip"
  command too. Needs Jukebox Jamz 5.3.0-0032.

What changed in 0.3.0
  Favorites playlist: POST /api/v1/playlist (all Favorite Streams in one
  repeating MPD queue), POST /api/v1/playlist/step {"delta": 1 or -1} and
  POST /api/v1/playlist/{index}/play. /status reports source kind
  "favorites" with index, count and the station name. Single streams and
  presets now turn MPD repeat off. The watchdog restores a lost favorites
  playlist at the station that was playing. Needs Jukebox Jamz 5.3.0-0031.

What changed from 0.1.0
  Kept: every endpoint and its answers, X-API-Key authentication, presets,
  preset names, playback intent, the recovery rules and back-off.
  New:  GET /api/v1/identity (a device ID made once and kept), GET
  /api/v1/capabilities, POST /api/v1/stream (play an http/https address:
  Favorite Streams and NAS library songs), GET /api/v1/health.
  Recovery: finished library songs are never restarted; after a reboot or
  MPD restart with an empty queue, the last preset or stream is put back.
  The device name comes from JUKEBOX_DEVICE_NAME or the host name (it was
  fixed to "Pijamz01"). The preset list only shows preset<number> playlists,
  sorted by number (preset10 after preset9).
  Safety: /stream refuses loopback, link-local and cloud-metadata
  addresses and anything that is not http/https. Home-network addresses are
  allowed (NAS songs need them); set JUKEBOX_PRIVATE_STREAMS=deny to refuse.
