Add M3U playlist / XMLTV export for external IPTV players#69
Open
selcukkirtas wants to merge 1 commit into
Open
Add M3U playlist / XMLTV export for external IPTV players#69selcukkirtas wants to merge 1 commit into
selcukkirtas wants to merge 1 commit into
Conversation
Exposes live channels as an Xtream-style playlist so external players
(TiviMate, IPTV Smarters, VLC) can use neTV as a source:
- GET /get.php?username=U&password=P -> M3U playlist (m3u_plus attrs)
- GET /xmltv.php?username=U&password=P -> XMLTV guide from local EPG db
- GET /live/U/P/{stream_id}.ts -> channel playback
Playback supports two admin-selectable modes: redirect (302 to the
provider, zero server bandwidth) and proxy (streams flow through the
server, hides provider URL and enforces per-user/per-source stream
limits). HLS direct URLs always redirect since proxying would require
rewriting segment URLs.
Integrates with existing auth: per-user channel restrictions apply to
both the playlist and playback, failed attempts feed the login rate
limiter, and PBKDF2 verification is cached in memory (5 min TTL,
invalidated on password change / user delete) to keep channel zapping
fast on small ARM boards.
Feature is off by default; enabled via a new Settings > M3U Export
section that also shows the player URLs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Exposes the live channels a neTV user can access as an Xtream-style playlist, so external IPTV players (TiviMate, IPTV Smarters, VLC, etc.) can use neTV as a source:
GET /get.php?username=U&password=P→ M3U playlist (m3u_plus attributes: tvg-id, tvg-logo, group-title)GET /xmltv.php?username=U&password=P→ XMLTV guide generated from the local EPG databaseGET /live/U/P/{stream_id}.ts→ channel playbackWhy
neTV's web UI is great on desktops and TVs with a browser, but many households also have devices where a native IPTV player app is the better (or only) option. This lets one neTV instance serve both, with the same user accounts and channel restrictions.
How
redirect(default): 302 to the provider URL — zero server bandwidth.proxy: bytes flow through neTV — hides the provider URL/credentials from clients and enforces per-user + per-source stream limits. HLS direct URLs always redirect (proxying would require rewriting segment URLs).unavailable_groupsfiltering applies to both the playlist and playback; failed attempts feed the existing login rate limiter. PBKDF2 verification results are cached in memory (5 min TTL, invalidated on password change/user delete) so channel zapping stays fast on small ARM boards.New logic lives in
m3u_export.pywith routes inmain.py, following the existingffmpeg_session.pymodule/route split.Testing
m3u_export_test.py(credential caching, playlist/XMLTV generation, group restrictions, stream limits, and route-level tests incl. redirect/proxy modes and rate limiting).ruffandbasedpyrightclean.🤖 Generated with Claude Code