Skip to content

Auto-detect Xtream-style M3U links (get.php) and connect via Xtream Codes API #101

Description

@bsogulcan

Problem

When adding an M3U link of the form http://host/get.php?username=...&password=...&type=m3u_plus&output=ts, some IPTV panels reject the get.php
download endpoint entirely (returning non-standard status codes like HTTP 884) while their Xtream Codes API (player_api.php) works fine. Users
hit "Server error (HTTP 884)" in the Add M3U screen even though their subscription is active.

This came from a user report: debugging confirmed the panel blocked get.php for every User-Agent, while player_api.php returned auth: 1 / status:
Active for the same credentials.

Other players (IPTV Smarters, TiviMate, etc.) already recognize these links and silently connect through the Xtream API instead.

Solution

When the user pastes an Xtream-style get.php link in the Add M3U screen:

  1. Detect the link shape and extract base URL + username + password (XtreamLinkDetector)
  2. Verify the credentials via player_api.php
  3. On success, add the playlist as Xtream Codes (full live/VOD/series sync) — this also unlocks the richer experience (VOD & series metadata,
    EPG)
  4. If the Xtream API doesn't answer, fall back to the plain M3U download flow

Applies to new playlists only — converting an existing M3U playlist on edit would orphan its favorites and watch history.

Scope

  • iOS
  • macOS (parity, separate codebase)
  • tvOS (parity, separate codebase)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions