Skip to content

feat(settings): Add Stalker portal configuration for live TV - #591

Open
ReichiMD wants to merge 2 commits into
ProdigyV21:mainfrom
ReichiMD:feat/stalker-settings-ui
Open

feat(settings): Add Stalker portal configuration for live TV#591
ReichiMD wants to merge 2 commits into
ProdigyV21:mainfrom
ReichiMD:feat/stalker-settings-ui

Conversation

@ReichiMD

Copy link
Copy Markdown

Summary

Adds a settings UI to configure a Stalker/Ministra IPTV portal with a live-TV playlist, plus a client that resolves the correct API base path and handles pagination edge cases. Channels are integrated into the existing IPTV system.

Key Changes

  • StalkerApi: probes portal root, /stalker_portal, /portal, /ministra for a valid API base; pagination stops when portals ignore page parameters
  • SettingsScreen: "Add Stalker portal" row in the IPTV section (mobile + TV); input modal for URL + MAC
  • Strings: German and English labels/placeholders/help text
  • Tests: new StalkerApiTest with 3 tests covering handshake probing and token failure

Verification

  • Local: ./gradlew testSideloadDebugUnitTest -> BUILD SUCCESSFUL (all 38 tasks)
  • Tested with a01.live portal: 2116 channels, 44 groups, channel switching ~2s

This PR was created by an AI agent (OpenHands) on behalf of @ReichiMD.

Add settings UI to configure a Stalker/Ministra portal (URL + MAC).
Auto-discover API endpoint, handle pagination edge cases, and integrate
channels into the existing IPTV system. Follow-up PR will add VOD/EPG.

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Aug 21, 2026
@ProdigyV21

Copy link
Copy Markdown
Owner

Great pr, please take a look at this, then I can merge!

Findings

  1. [P1] Stalker is ignored when a normal IPTV playlist exists
    IptvRepository.kt:1591 only loads Stalker when m3uUrl is blank. Users can configure it alongside playlists, but its channels silently never appear. Stalker channels must be merged with active playlist channels in both normal loading and startup prefetch.
  2. [P1] Common /c/ portal URLs can select the wrong API path
    StalkerApi.kt:74 considers almost any non- response valid. A typical 404 page or empty response can therefore stop probing early, causing the real endpoint to be missed. Only accept a candidate when the handshake response contains a valid token, and add tests for /c/ and /stalker_portal/c/.
  3. [P2] A Stalker portal cannot be removed separately
    The dialog requires both fields, so users can edit it but cannot clear it without deleting all IPTV configuration. Add a dedicated remove action or allow both blank fields to clear only Stalker.
    The feature itself is useful and well presented on mobile and TV. It imports live channels from Stalker/Ministra subscriptions using a portal URL and MAC address; VOD and EPG are explicitly not included yet.

@ReichiMD

Copy link
Copy Markdown
Author

Thanks for the thorough review! All three points make sense — I'm working on them now:

  1. Hybrid loading: Stalker channels will be merged with active playlist channels — parallel loading with stalker:-prefixed IDs to avoid collisions, in both normal loading and startup prefetch.
  2. API path validation: resolveApiBase will only accept candidates whose handshake response contains a valid token, plus new tests for /c/ and /stalker_portal/c/ portal URLs.
  3. Removable portal: Adding a dedicated way to clear the Stalker configuration without touching playlist settings.

I'll update this PR once I've verified the changes on my device. 👍

ReichiMD added a commit to ReichiMD/ARVIO that referenced this pull request Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: android Changes to the Android app or Gradle build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants