Commit Graph
42 Commits
Author SHA1 Message Date
d35875e3d1 fix hls close revision file at reader deadline (#907)
* fix hls close revision file at reader deadline

Move the progressive revision reader onto its own task and feed the
response stream through a bounded channel. At the deadline the watchdog
aborts the reader, so the file handle and revision pin are released
even if a stalled client never polls the stream again.

Each open revision file now holds its own pin, so GC cannot retire a
revision while a handle is open, including one held by an in-flight
blocking read.

* fix hls close revision file at reader deadline

Move the progressive revision reader onto its own task and feed the
response stream through a bounded channel. At the deadline the watchdog
aborts the reader, so the file handle and revision pin are released
even if a stalled client never polls the stream again.

Each open revision file now holds its own pin, so GC cannot retire a
revision while a handle is open, including one held by an in-flight
blocking read.

---------

Co-authored-by: euzu <euzu@proton.me>
2026-10-09 17:41:39 +02:00
b8486cffc7 fix(hls): keep provider affinity after reconnect lease expiry (#894)
* fix(hls): keep provider affinity after reconnect lease expiry

- Remember the provider that last delivered media for reconnect-capable
  playback (HLS, DASH, Catchup, VOD) beyond the lease window. The
  preference holds no slot, never forces grace and falls back to the
  lineup when the provider is full.
- End it on provider failure, preemption, kick, timeout or admin
  terminate; stale cleanups are rejected by binding tag, request ID and
  session token. Retry token claims stay bounded.
- Terminate and kick now release the HLS binding they acquired.
- Add reverse_proxy.stream.provider_affinity_ttl_secs (default 120,
  max 86400) with Web UI field, docs and translations.
- Testkit: pause_millis steps, TTL overrides and the
  m3u-hls-provider-affinity-after-lease-expiry scenario.

* fix(hls): keep provider affinity after reconnect lease expiry

- Remember the provider that last delivered media for reconnect-capable
  playback (HLS, DASH, Catchup, VOD) beyond the lease window. The
  preference holds no slot, never forces grace and falls back to the
  lineup when the provider is full.
- End it on provider failure, preemption, kick, timeout or admin
  terminate; stale cleanups are rejected by binding tag, request ID and
  session token. Retry token claims stay bounded.
- Terminate and kick now release the HLS binding they acquired.
- Add reverse_proxy.stream.provider_affinity_ttl_secs (default 120,
  max 86400) with Web UI field, docs and translations.
- Testkit: pause_millis steps, TTL overrides and the
  m3u-hls-provider-affinity-after-lease-expiry scenario.

* fix(hls): keep provider affinity after reconnect lease expiry

- Remember the provider that last delivered media for reconnect-capable
  playback (HLS, DASH, Catchup, VOD) beyond the lease window. The
  preference holds no slot, never forces grace and falls back to the
  lineup when the provider is full.
- End it on provider failure, preemption, kick, timeout or admin
  terminate; stale cleanups are rejected by binding tag, request ID and
  session token. Retry token claims stay bounded.
- Terminate and kick now release the HLS binding they acquired.
- Add reverse_proxy.stream.provider_affinity_ttl_secs (default 120,
  max 86400) with Web UI field, docs and translations.
- Testkit: pause_millis steps, TTL overrides and the
  m3u-hls-provider-affinity-after-lease-expiry scenario.

---------

Co-authored-by: euzu <euzu@proton.me>
2026-10-01 18:55:22 +02:00
euzuandGitHub d280a5484f fix(hls): reuse stable provider lease owners across playback retries (#890)
* fix(hls): reuse stable provider lease owners across playback retries

Keep public HLS tokens unique while sharing provider leases by
client/user/channel fingerprint. Preserve request ID and binding
generation guards and scope socket cleanup to the original session.

Add regression tests for repeated retries, stale cleanup, reused
sockets and M3U alias fallback with an A=2/B=4 provider pool.

* fix(hls): reuse stable provider lease owners across playback retries
- Keep public HLS tokens unique while sharing provider leases by
client/user/channel fingerprint. Preserve request ID and binding
generation guards and scope socket cleanup to the original session.

- Add regression tests for repeated retries, stale cleanup, reused
sockets and M3U alias fallback with an A=2/B=4 provider pool.

fix: proxy external Xtream VOD sources in M3U reverse mode
- Resolve stored VOD URLs using the existing input identity.
- Use canonical movie URLs for alias accounts with the original stream ID.
- Keep redirects internal and stop forwarding upstream Referer headers.
- Add regression tests for CDN URLs, aliases, ranges, and URL leakage

* fix(hls): reuse stable provider lease owners across playback retries
- Keep public HLS tokens unique while sharing provider leases by
client/user/channel fingerprint. Preserve request ID and binding
generation guards and scope socket cleanup to the original session.

- Add regression tests for repeated retries, stale cleanup, reused
sockets and M3U alias fallback with an A=2/B=4 provider pool.

fix: proxy external Xtream VOD sources in M3U reverse mode
- Resolve stored VOD URLs using the existing input identity.
- Use canonical movie URLs for alias accounts with the original stream ID.
- Keep redirects internal and stop forwarding upstream Referer headers.
- Add regression tests for CDN URLs, aliases, ranges, and URL leakage
2026-10-01 08:16:56 +02:00
euzuandGitHub 305587f40b fix: retry unstarted streams on an available provider alias (#885)
* **Bug Fixes**
  * Playback retries can use another available provider when playback has not started, helping requests proceed if the initially selected provider is unavailable.
  * Once playback has started, retries continue using the same eligible provider to preserve playback continuity.
  * Provider selection follows the same rules for regular playback and forced reopens, reducing unnecessary provider pinning before media begins.
  * Series episode URLs can resolve to the correct account-specific playback address.
2026-09-27 10:23:35 +02:00
euzuandGitHub 278bf41d2c Fix/stalker (#884)
* **New Features**
  * Stalker playback resolves channel links on request, using available channel commands and falling back to the stored command when needed.
  * If a portal rejects a session, playback retries once after reconnecting.

* **Bug Fixes**
  * Reading playlists or resolving playback for a different portal identity no longer replaces the published catalog or clears its refresh checkpoint.
  * A failed channel playback no longer prevents other published channels from remaining available.

* **Documentation**
  * Updated Stalker playback guidance to describe on-demand link resolution and session recovery.
2026-09-26 18:56:17 +02:00
euzuandGitHub 2c07d52b93 Fixed max user connection screen when grace granted (#880)
* **Bug Fixes**
  * Improved live-stream session handling during instant grace periods, including when a session has not yet been created.
  * Corrected connection-limit and eviction tracking so active streams remain eligible for eviction even when their session record is unavailable.
  * Improved reliability when switching between live channels under connection limits.
* **Improvements**
  * Updated staged M3U overlays for Xtream providers: staged groups determine selected categories and channels, while unmatched categories remain available. Provider categories with no usable staged channels are retained.
* **Documentation**
  * Clarified how staged Xtream and M3U playlists affect provider categories and channels.
2026-09-25 08:22:11 +02:00
euzuandGitHub 6ffddc259a Provider pinned failover (#873)
- **New Features**
  - Added assertions for verifying which provider account handled the latest request.
  - Enabled provider-affine playback to fall back to another available provider when the pinned provider is unavailable.

- **Bug Fixes**
  - Improved provider fallback handling, origin request tracking, and session updates.
  - Preserved session headers when fallback stream setup fails and refreshed them after successful fallback.

- **Tests**
  - Added coverage for provider-pool failover, account reuse, limits, rejection handling, and eviction behavior.
2026-09-22 12:21:52 +02:00
euzuandGitHub 6a567d264e Feature/connection handling (#869)
* **New Features**
  * Added an opt-in runtime liveness watchdog with diagnostics, health status, and optional automatic restart.
  * Added configurable stream cleanup capacity and eviction re-entry protection.
  * Expanded configuration and UI access for users with playlist or user permissions, with safer data sanitization.
  * Added testkit scenarios and reporting for playback, admission, provider limits, sharing, and VOD behavior.
  * Added support for experimental-branch Docker builds.

* **Bug Fixes**
  * Improved provider prioritization, shared playback capacity, cleanup, reconnect handling, and concurrent client behavior.
  * Fixed playlist parsing for declared media types.
  * Release links now use the configured destination.
2026-09-19 10:17:23 +02:00
euzuandGitHub 9ec775b35b Feature/multi crate (#837)
Refactored to multi crate project
2026-08-27 15:36:23 +02:00
euzu b9198c9963 hls reverse proxy handling refactored 2025-04-16 14:23:16 +02:00
euzu 83d991838f fixed web server config for production 2025-02-24 12:47:28 +01:00
euzu 4889b77add A lot of changes to add hls support. 2025-01-31 23:08:23 +01:00
euzu 639b6e4c98 fixed clippy warnings 2025-01-30 12:32:09 +01:00
euzu 7012379539 fixed series redirect 2025-01-26 13:16:07 +01:00
euzu 7231f27333 Fixed xtream affix-processed output 2025-01-22 09:25:04 +01:00
euzu 3b12ea1772 fixed reconnect 2025-01-16 09:43:21 +01:00
euzu 9ba3064619 stream response partial added 2025-01-10 13:07:35 +01:00
euzu d486f04905 reconnect stream wip 2025-01-07 14:00:13 +01:00
euzu 29d22b3b5d vod and series info reverse proxy links 2025-01-05 18:22:23 +01:00
euzu d08a1c398a Added xtream logo, backdrop_path, cover url rewrite in reverse proxy mode 2025-01-03 16:49:24 +01:00
euzu a787e7763e fixed some debug output 2025-01-02 15:09:11 +01:00
euzu a027e808b1 Resolve Series name processing added 2024-12-30 10:27:25 +01:00
euzu 6280a252d7 resolve series and vod with kodi export 2024-12-28 16:26:04 +01:00
euzu dfe6269866 resolve series wip 2024-12-25 14:12:30 +01:00
euzu 454e85e6d2 resolve series wip 2024-12-25 12:02:00 +01:00
euzu 4813ad749e http test env added 2024-12-25 09:33:59 +01:00
euzu fce9136237 resolve series wip 2024-12-24 15:00:05 +01:00
euzu ee689b5f0a xtrem reolve video/series wip 2024-12-22 05:00:59 +01:00
euzu d8a89e37ee fixed an error log which was not an error 2024-12-13 18:09:45 +01:00
euzu a33c6a2a31 fixed xtream redirect url 2024-12-03 14:49:23 +01:00
euzu 36001a538a Added Target Output Option m3u_mask_redirect_url 2024-12-03 11:56:58 +01:00
euzu 563c249fb6 added m3u_use_type_url to target options.
refactored some code
2024-12-02 17:24:06 +01:00
euzu 6098236c75 added post api to m3u 2024-11-22 09:58:28 +01:00
euzu 7fcc4400d1 api responses now as stream to avoid memory allocation 2024-11-01 11:14:04 +01:00
euzu e5173ad903 Some optimizations, optional value compression for BPlustree 2024-10-30 11:14:55 +01:00
euzu c904b725ef virtual id mapping for m3u and xtream api 2024-10-28 20:15:27 +01:00
euzu f1ef173fc3 virtual id refactoring 2024-10-25 18:26:25 +02:00
euzu e240259d55 added transform to mapper 2024-09-18 19:50:38 +02:00
euzu 17ed1155d2 fixed filter for series and vod Type 2024-09-11 16:36:12 +02:00
euzu 8d9a41de96 fixed group merging 2024-09-11 12:13:05 +02:00
euzu 6747b234f1 auth url now based on api url and not location,
fixed readme for input headers
2024-07-07 11:54:19 +02:00
euzu babb93f410 added simple Web-UI 2021-10-07 20:11:54 +02:00