PowerTV Client for Windows
==========================

Plays the online (IPTV/HLS) channels published by PowerTV on your Linux PC.
The Windows client is online-only: the broadcast/tuner channels stay on the
Linux machine (with its USB tuner), so no Windows tuner driver is needed.

Requirements
  * Windows 10/11, 64-bit
  * The Linux PC running PowerTV's server on the same network

Quick start
  1. On the Linux PC:
         ./build/powertv serve --port 8090
     It prints the channel count and listens on TCP 8090. If the Linux firewall
     is enabled, allow 8090 for your local network. The list only contains the
     online channels the server can reach.
  2. Copy this folder to the Windows PC.
  3. Run (replace the IP with the Linux box's address):
         powertv-client.exe --server http://192.168.1.20:8090

Command line
  --server URL      server address (default http://127.0.0.1:8090)
  --list-open       start with the channel list open
  --check           print the server's channel list and exit (diagnostics)
  --screenshot out.ppm [--screenshot-after sec]
  --help

Keys
  Up / Down    previous / next channel
  Enter        open the channel list / play the selected channel
  L or Tab     toggle the channel list
  F or F11     fullscreen
  M            mute
  Q or Esc     close the list, then quit

Files
  powertv-client.exe
  SDL3.dll
  libmpv-2.dll
  fonts/NotoSans-Regular.ttf, fonts/NotoSansThai-Regular.ttf (channel names)
  fonts/OFL.txt

Troubleshooting
  * "connection failed": is the server running, on the same network, and not
    blocked by a firewall? Try:
         powertv-client.exe --check --server http://<linux-ip>:8090
  * "No online channels": the server is reachable but its playlist has no
    reachable online channels - check the Linux box's internet connection.
  * Black video but the list works: the machine needs an OpenGL 3.2+ driver;
    run from a console to see mpv's error messages.
  * Thai names show as '?': keep the fonts/ folder next to the exe.

Notes
  * The list shows online channels only (globe icon, IPTV/HLS). The server reports
    them when its own internet connection can reach them; the client plays those
    URLs directly. Broadcast/tuner channels are not listed.
  * Audio-only streams (radio) show a radio card with the station name and an
    animated waveform instead of a black window.
  * One viewer per server; switching channels affects everyone.
  * The HTTP API has no authentication - use it only on a trusted LAN.
  * Built on Linux with mingw-w64 and smoke-tested under Wine; the video path
    uses the same code as the Linux client.

Building from source (cross-compile on Linux)
  ./tools/build-windows.sh        downloads mingw-w64, SDL3, libmpv (~600 MB)
