916 Commits
Author SHA1 Message Date
euzuandGitHub 89a0f2f477 Feature/script egine (#954)
* Embedded rhai scripting for mapper
2026-10-30 22:23:08 +01:00
knylbyte 815c8c9c44 fix (hls): refresh idle starts before terminal fallback
Refresh idle leases before deciding terminal playback, and keep evicted
windows retryable while the manifest refresh is debounced.

Avoid the global access-lease write lock on healthy completions.
Revalidate failed attempts after acquiring lease-store and session locks.

Cover idle recovery in all startup modes and cleanup lock contention.
2026-10-30 17:43:00 +01:00
knylbyte f4442125ce fix (hls): preserve provider bindings during bounded recovery 2026-10-30 16:35:08 +01:00
knylbyte 9cd753fe9d fix (hls): avoid session read lock deadlocks during origin setup 2026-10-30 16:35:08 +01:00
knylbyte ac58589d4f fix (hls): prevent terminal leases from starting origin work 2026-10-30 16:35:08 +01:00
knylbyte 6a553dbb27 fix (hls): release failed starts and honor fallback configuration 2026-10-30 16:35:08 +01:00
knylbyte 65b198821d fix (hls): protect provider reservations during startup and retries 2026-10-30 16:35:08 +01:00
knylbyte 132731de06 fix (hls): recover failed pending and idle entry windows 2026-10-30 16:35:08 +01:00
knylbyte 119213da82 fix (hls): preserve resource identity and stabilize account reuse 2026-10-30 16:35:08 +01:00
knylbyte fb5cd007fe wip (hls): final cutover 2026-10-30 16:35:08 +01:00
euzuandGitHub 3c4e18f996 fast get_series, memory-cache lists, consistent sort order (#952)
* fast get_series, memory-cache lists, consistent sort order

- skip series episode details on list decode and in memory cache
- serve Xtream lists from memory cache in canonical order
- keep sorted index valid after resolve writes
- cache verify_full per database identity
- resource proxy: single attempt, 15s timeout, 6 fetches per host
2026-10-30 15:00:49 +01:00
euzuandGitHub e8a7f2629e Ship log records to an external syslog collector over UDP (#951)
* Ship log records to an external syslog collector over UDP

Add opt-in log.syslog (off by default): RFC 5424, RFC 3164 or NDJSON
datagrams, optional remote log level independent of stdout and the
Web-UI, bounded queue with drop counters, dedicated worker thread, live
reload without restart.

* fix filter parse long filter chains without a stack limit error

pest 2.9.4 probes the native stack before parsing and reports only the
mapped stack region on static musl (~128 KiB), so a filter chain of a few
dozen terms failed with "stack limit reached" and restarted the container.
pest 2.9.5 limits the probe to targets whose stack bounds it can determine.

The expr rule now reads a chain as a flat operand list and folds it from the
right, so a long AND/OR chain no longer nests the parser stack while
grouping, NOT binding and results stay identical to the previous grammar.
2026-10-30 06:57:14 +01:00
euzuandGitHub 44d056b76d Fix/filter parse stack guard (#946)
* fix filter parse long filter chains without a stack limit error

pest 2.9.4 probes the native stack before parsing and reports only the
mapped stack region on static musl (~128 KiB), so a filter chain of a few
dozen terms failed with "stack limit reached" and restarted the container.
pest 2.9.5 limits the probe to targets whose stack bounds it can determine.

The expr rule now reads a chain as a flat operand list and folds it from the
right, so a long AND/OR chain no longer nests the parser stack while
grouping, NOT binding and results stay identical to the previous grammar.

* store the filter tree in an arena instead of nested boxes

Parsing, rendering, evaluating and dropping a filter no longer recurse per term,
so a long AND/OR chain no longer depends on the thread's stack.
2026-10-29 19:20:34 +01:00
euzuandGitHub 978b3bb4f0 api-proxy: configurable credential generation for new users (#942)
* api-proxy: configurable credential generation for new users
* fix: HLS test fail
2026-10-27 21:55:55 +01:00
euzuandGitHub ab4f41e517 fix: accept ranged VOD responses mislabeled text/html (#940)
* fix: accept ranged VOD responses mislabeled text/html

Skip the HTML content-type rejection for 206 and Content-Range
responses so valid media from providers with a wrong Content-Type
plays in reverse proxy mode.

* add playback_provider to bind provider profile

Lets mapped provider:// playback URLs resolve on inputs whose url and
aliases are plain http(s), fixing 503 "Provider config not found".
2026-10-27 14:39:12 +01:00
0892c9d9e6 Feature/hls origin telemetry (#939)
* hls: add origin transfer telemetry

Measure existing shared-HLS origin fetches (segment, map, key,
manifest) and expose per-input availability and transfer quality at
GET /api/v1/hls/origin-telemetry and via the MCP tool
get_hls_origin_telemetry. Off by default via
reverse_proxy.hls_origin_telemetry, configurable in the Web UI.

Also split the reverse proxy config page into tabs.

* hls: add origin transfer telemetry

Measure existing shared-HLS origin fetches (segment, map, key,
manifest) and expose per-input availability and transfer quality at
GET /api/v1/hls/origin-telemetry and via the MCP tool
get_hls_origin_telemetry. Off by default via
reverse_proxy.hls_origin_telemetry, configurable in the Web UI.

Also split the reverse proxy config page into tabs.

* hls: add origin transfer telemetry

Measure existing shared-HLS origin fetches (segment, map, key,
manifest) and expose per-input availability and transfer quality at
GET /api/v1/hls/origin-telemetry and via the MCP tool
get_hls_origin_telemetry. Off by default via
reverse_proxy.hls_origin_telemetry, configurable in the Web UI.

Also split the reverse proxy config page into tabs.

---------

Co-authored-by: euzu <euzu@proton.me>
2026-10-27 13:27:21 +01:00
euzuandGitHub c0673ccec9 hls: do not require account credentials for token-only provider urls (#938)
The provider:// origin rewrite called get_user_info() before checking
whether a credential rewrite is needed. Token-only M3U accounts have no
username/password, so the media manifest failed with 503 before
2026-10-27 10:16:07 +01:00
euzuandGitHub ed264f0f4d keep distinct item identity and expose posters (#937)
Media-server items shared one UUID in duplicate_filter, so Jellyfin
catalogs collapsed to a single entry. Derive the UUID from the stable
media-server id. Set header.logo for movies, series and episodes so
Xtream and M3U clients show posters.
2026-10-27 09:37:31 +01:00
euzuandGitHub 0cb5e5e7df - Dependency upgrade (#934)
* - Dependency upgrade
- Slotfree HLS manifest fetch (partial)
2026-10-24 16:33:30 +02:00
euzuandGitHub 7c82bf0b5d Feature/mcp (#933)
* Added
 - MCP server with Web UI config, stdio bridge and docs

Fixes
- GET /api/v1/stream-history rejected the `search_field` parameter the Web UI
  sends (400), because axum's Query cannot read repeated keys into a list.
  Add a FormQuery extractor (serde_html_form) and use it there.
- hls tests were flaky: HlsProxyManager::new() put every test manager's
  segment cache into the shared /tmp/tuliprox/cache/hls, and the orphan
  session cleanup of one manager deleted the files of parallel tests
  (surfacing as MissingTimestampAnchor / TerminalUnavailable). Each manager
  now owns a private cache directory that is removed on drop.

* fixed documentation: db dump paths and flag usage in operations-debugging

* Logs is a standalone Web UI view.

* mcp playlist iterator

* mcp playlist iterator

* media server import uses own categories

* mcp playlist iterator

* Playlit Update view layout changed
2026-10-24 09:49:44 +02:00
euzuandGitHub d9597c46ee Fix/media server url (#931)
* media-server scheme or jellyfin_emby_plex

select_provider_stream_url now accepts a media-server:// reference when
the input type is Emby, Jellyfin or Plex. Other input types still reject
it.
2026-10-23 12:57:14 +02:00
knylbyte 46cb2480de fix (chore): clippy 2026-10-23 11:53:23 +02:00
knylbyte b551ecc5ec fix (hls): retry reserved provider admission within manifest budget 2026-10-23 09:27:14 +02:00
knylbyte 1ef097cbd0 fix (hls): preserve live playback across origin binding changes 2026-10-23 00:22:09 +02:00
knylbyte 25335baa86 fix (hls): bound manifest retries and revalidate live playback entries 2026-10-22 18:52:53 +02:00
knylbyte ea206629b6 fix (hls): correct live reserve accounting and terminal cutover 2026-10-22 10:38:06 +02:00
knylbyte 3a451fc955 merge (hls): retain published manifests during live window transitions 2026-10-22 10:37:40 +02:00
knylbyte a9f68431d1 feat (hls): add HLS origin recovery preferences and automatic segment timeouts 2026-10-22 10:28:59 +02:00
knylbyte 4ed2efa6de fix (hls): retain published manifests during live window transitions 2026-10-21 13:35:57 +02:00
knylbyteandGitHub 69cfbab900 fix (hls): recover shared playback and correct live startup windows (#928)
* fix (hls): recover shared HLS retries and stream the first lease segment

* fix (hls): select fast-start live windows from the stripped live edge

Plan each lease's three-segment entry after applying strip to the full
origin window. Share the plan across rendering, required fetches and
publication, then grow activated windows forwards while preserving cached
predecessors.

Retain current-origin mappings during cache eviction and retire obsolete,
unprotected metadata during GC. Add window-selection, lease-boundary and
metadata-lifecycle regression tests and document the live entry behavior.

Validation: 1,238 HLS tests passed (2 ignored); 5 manifest API tests passed;
the independent 100-window metadata probe passed.

* fix (hls): preserve startup fallback and scope metadata cleanup

* fix (hls): wake fast-start fetches from provider fallback

* test (hls): cover unpublished fallback during lease recovery
2026-10-21 00:23:30 +02:00
knylbyte 305c7f6e6f test (hls): cover unpublished fallback during lease recovery 2026-10-20 23:01:36 +02:00
knylbyte 6060a7b789 fix (hls): wake fast-start fetches from provider fallback 2026-10-20 22:23:54 +02:00
knylbyte 57e4babae9 fix (hls): preserve startup fallback and scope metadata cleanup 2026-10-20 21:37:28 +02:00
knylbyte 0bbd037433 fix (hls): select fast-start live windows from the stripped live edge
Plan each lease's three-segment entry after applying strip to the full
origin window. Share the plan across rendering, required fetches and
publication, then grow activated windows forwards while preserving cached
predecessors.

Retain current-origin mappings during cache eviction and retire obsolete,
unprotected metadata during GC. Add window-selection, lease-boundary and
metadata-lifecycle regression tests and document the live entry behavior.

Validation: 1,238 HLS tests passed (2 ignored); 5 manifest API tests passed;
the independent 100-window metadata probe passed.
2026-10-20 20:56:03 +02:00
knylbyte 49ff4e452f fix (hls): recover shared HLS retries and stream the first lease segment 2026-10-20 20:56:03 +02:00
euzuandGitHub bdd5850cd4 addded Emby/Jellyfin catalog import to media-server (#927)
- Emby/Jellyfin client: token/api_key/login auth, paging, Range playback, artwork
- Jellyfin uses only Authorization: MediaBrowser header (Jellyfin 12 compatible)
- AnyMediaServerCatalogClient dispatch, shared helpers reused by Plex
- Update/Refresh for Emby/Jellyfin inputs in the Web UI
- BREAKING: remove unused media_server options (playback, image_policy,
  catalog.refresh_mode/refresh_on_startup/include_paths/include_user_state)
2026-10-20 19:56:10 +02:00
knylbyteandGitHub 5ae547f5e5 FIX: stabilize shared HLS playback, recovery and account handovers (#925)
* fix (hls): preserve playback reserve across cache eviction

keep a stable session media clock and completed segment timings so cache
eviction and origin rollovers cannot reset playback reserve.

update segment fixtures and cover reserve stability after collection.

* fix (hls): prevent playback stalls during origin manifest retries

mark the origin as degraded on the first retryable manifest failure, cap
retry-after delays, and reevaluate reserve independently of client polling.

use a bounded state commit after an expired splice deadline instead of
leaving the lease live when terminal media cannot be published safely.

* fix (hls): serve custom responses after the live splice deadline

publish a finite lease-bound channel_unavailable playlist on the existing
manifest route when a safe live splice is no longer possible.

renew lease and session activity on successful custom-segment requests
and retain concrete preparation failure diagnostics.

* fix(hls): persist origin qualification for short playlists

Share qualification and retry receipts across leases, preserve them while media publication is pending, and allow controlled recovery after expired acceptance episodes. Prefer eligible regular candidates before short fallbacks.

Add startup, revalidation, replay, cookie and endpoint regression coverage, and document short-window behavior.

Validation during implementation: Linux make test (7009 passed, 23 ignored), focused HLS and endpoint suites, format checks, Clippy and Markdown lint. Offline production library and backend checks passed after the import fix.

* fix(hls): reconcile cache write budgets and revision reclamation

Transfer reserved bytes atomically through staging and publication, preserve cleanup ownership across cancellation, and retire unpinned revisions during local and global reclamation.

Version temp registrations during inventory scans, remove production panic calls, and isolate debug diagnostics from admission results.

Validation: 1,162 HLS tests and 7,038 workspace tests passed; fmt-check, lint, test, markdown-lint and isolated production Clippy passed with dev-slim.

* feat (ai): add local codex files

* fix (hls): replace invalid origin accounts in shared HLS sessions

* fix (hls): synchronize origin account handovers across WebUI viewers

* fix (hls): preserve same-account resume work and backpressure

* fix (hls): resume reduced retries without crossing generations
Allow eligible exhausted acceptance episodes to select reduced retry candidates
while preserving generation, candidate, workload and timing guards. Keep
recovery chains bound to their generation, including changes between selection
and commit.

Add regressions for repaired and persistent resource conflicts, generation
isolation and media delivery through the app's local HTTP origin. Keep shared
manifest fixtures under test/fixtures/hls/reduced-retry.
2026-10-19 17:42:50 +02:00
euzuandGitHub fae862b78a Feature/hdhomerun auto channel (#920)
* hdhomnerun auto_channel
2026-10-16 10:42:04 +02:00
euzuandGitHub 4aa4fd30ad fix hls keep cached predecessors in optimistic startup windows (#919)
With startup.mode = optimistic, session.startup stays set for the whole
session lifetime on clear MPEG-TS sources. select_window's startup branch
returned before retain_published_predecessors, so the v3.3.153
three-target-duration retention never ran in that mode. A 3-segment
origin window was served unchanged (e.g. 17.96 s with target 7), both on
retained-session return entries and during steady playback.

Apply the retention after the startup branch's MIN_VISIBLE_SEGMENTS check.
The retention rules are unchanged: only contiguous Ready, renderable,
non-provisioning predecessors are added, never before the previously
rendered first segment, and the window is capped at
TARGET_VISIBLE_SEGMENTS.
2026-10-14 20:36:50 +02:00
euzuandGitHub 824828f6c7 fix hls: stale stream rows, panel blanking and re-entry window jumps (#918)
* fix hls: stale stream rows, panel blanking and re-entry window jumps
* fix session: release grace-expired slot once, match rows by token
* rusttls vulnerability fixed
* fix testkit: keep scenario run id across bootstrap retries
2026-10-14 08:51:46 +02:00
euzuandGitHub 69040f022b Feature/maintenance (#916)
* Maintenance mode
* fix(hls): release origin slot before next origin I/O
2026-10-13 22:30:21 +02:00
euzuandGitHub 1f0ded31b6 fix hls expire idle sessions held by startup revisions (#915)
fix hls  expire idle sessions held by startup revisions
fix session reuse shared stream row per device session
2026-10-13 20:59:45 +02:00
euzuandGitHub 0ddc3e21cc feat(hls): add optimistic startup mode (#914) 2026-10-12 22:43:06 +02:00
euzuandGitHub dc6e22a70a fix(hls): skip unexposed 404 live head (#913) 2026-10-12 21:43:31 +02:00
euzuandGitHub b6bab647df feat(watch): group added/removed contexts per watch entry (#912)
* feat(watch): group added/removed contexts per watch entry

- watch entries: regex string or {pattern, on:
[channels|group_added|group_removed]}
- one playlist.watch.changed per refresh with WatchChange list;
playlist.groups.changed aliased
- Telegram/ntfy message length limits
- web UI: Mapping and Watch sub pages, new Mapping icon
- ClusterFlags on create_bitset!, bitflags removed

BREAKING CHANGE: playlist.watch.changed templates must use the new
watch.* fields

* feat(watch): group added/removed contexts per watch entry

- watch entries: regex string or {pattern, on:
[channels|group_added|group_removed]}
- one playlist.watch.changed per refresh with WatchChange list;
playlist.groups.changed aliased
- Telegram/ntfy message length limits
- web UI: Mapping and Watch sub pages, new Mapping icon
- ClusterFlags on create_bitset!, bitflags removed

BREAKING CHANGE: playlist.watch.changed templates must use the new
watch.* fields
2026-10-12 21:05:55 +02:00
euzuandGitHub 0d53b22479 fix hls: start rebased retained sessions on the new origin window (#911)
* fix hls: start rebased retained sessions on the new origin window

* fix hls: only drop rebase head when unused and tail is not continued
2026-10-12 16:35:17 +02:00
euzuandGitHub d1c4056965 fix hls: require fresh origin window for new playback on retained ses… (#910)
* fix hls: require fresh origin window for new playback on retained sessions, count known-length revision bodies as completed

- New playback leases joining a retained shared session no longer start
on
  a stale committed window. If the origin window was last confirmed more
  than two target durations ago, admission requires a fresh commit
  (StaleEntryWindow) using the strict pinned host and no recovery burst.
  This prevents the forward jump after fast-start entry.
- RevisionResponseStream tracks bytes sent. A known-length body that is
  dropped after its final byte is now recorded as completed and marks
  segment completion instead of logging outcome=dropped.
- Add an end-to-end re-entry regression test covering progressive,
  first_ready and conservative, plus unit tests for the commit
  requirement and revision completion.
2026-10-12 09:53:04 +02:00
euzuandGitHub a3124a37f5 fix epg: adopt guide channel ID casing on matched live streams, fix frontend: hide column rail on empty tables (#908)
* - fix epg: adopt guide channel ID casing on matched live streams
Synchronize the stream's `epg_channel_id` to the exact casing of the
matched XMLTV guide channel. This fixes exact-key B+Tree lookups in short
EPG and client API responses when stream and guide IDs differ in case.

- fix frontend: hide column rail on empty tables

* - fix epg: adopt guide channel ID casing on matched live streams
Synchronize the stream's `epg_channel_id` to the exact casing of the
matched XMLTV guide channel. This fixes exact-key B+Tree lookups in short
EPG and client API responses when stream and guide IDs differ in case.

- fix frontend: hide column rail on empty tables
2026-10-09 23:12:57 +02:00
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
euzuandGitHub 62aea2a2fe persist table layouts and unify column metadata (#906)
* **New Features**
  * Customize table columns by showing, hiding, and reordering them, with keyboard or pointer controls.
  * Save layouts per account, restore defaults, and resolve conflicts when preferences change elsewhere. On installations without web authentication, settings are shared.
  * CSV tables now support saved layouts for recognized table structures.
* **Bug Fixes**
  * Improved pagination bounds and page-size validation.
  * Settings requests now return clearer errors for oversized or unreadable request bodies, and recheck access after waiting for settings to become available.
* **Documentation**
  * Added guidance for table customization and the settings API.
2026-10-08 13:28:41 +02:00