When JWT authentication is enabled (JWT__ISSUERSIGNINGKEY), ErsatzTV requires a valid
token for all IPTV endpoints.
HLS players typically request the playlist with the access_token query parameter,
but segment requests (.ts files) do not include Authorization headers. The generated
playlist previously produced segment URLs without the access_token parameter,
causing segment requests to fail with 401 Unauthorized.
This change propagates the access_token query parameter from the playlist request
to all generated HLS segment URLs.
Before:
/iptv/hls-direct/1.ts?index=1
After:
/iptv/hls-direct/1.ts?index=1&access_token=TOKEN
This allows authenticated playback with HLS players that do not support sending
Authorization headers for segment requests.
Impact:
- Fixes 401 errors when streaming with JWT enabled
- Enables JWT-protected IPTV playback in common HLS players
- Maintains backward compatibility when JWT authentication is disabled
Testing:
- Verified playback using IPTV Smarters
- Confirmed HLS segment requests include access_token
- Confirmed successful playback of protected streams