Commit Graph
216 Commits
Author SHA1 Message Date
Stenio AraujoandGitHub f2370b1545 Support VOD (movies) and Series from M3U sources in the Xtream API (#830)
* feat(parser): support tvg-type VOD/Series in M3U and synthesize SeriesInfo

- recognize tvg-type=movie|vod|video as Xtream VOD, series|episode as
  Series, and live explicitly, taking precedence over extension inference
- for series rows, treat group-title as the show name and #EXTGRP only as
  the default Xtream series category, keeping @Group mappable
- group series rows by category + show name and synthesize
  SeriesStreamProperties/SeriesInfo via the existing Xtream series path
- extract SxxEyy from titles; generate deterministic u32 episode IDs;
  use numeric tvg-id as series ID when available
- build docker with rust 1.95 (project requires rustc >= 1.95.0)

* fix(xtream): serve embedded seasons/episodes for M3U-synthesized SeriesInfo

M3U-synthesized SeriesInfo items carry their series details in
additional_properties but were not recognized by the stream info endpoint
(item_type is not local, no provider URL), so get_series_info returned an
empty array and IPTV clients showed no seasons/episodes.

Route items with embedded details through the local info-document path so
embedded seasons/episodes are serialized by to_info_document.

* fix(parser): normalize series category in M3U series-map key
2026-08-21 19:23:53 +02:00
euzuandGitHub 16d32d1298 DVR Feature (#819)
feat: complete DVR and improve streaming, security, configuration, and UI

Complete the Digital Video Recorder subsystem and add a broad set of
reliability, security, streaming, configuration, processing, and Web UI
improvements across Tuliprox.

DVR:

* complete live recording and provider-aware VOD download support
* add recording queue, workers, scheduling, and recurring recording rules
* add conflict detection and capacity-aware scheduling
* add pause, resume, retry, edit, cancel, and delete workflows
* add recording quotas and configurable retention policies
* add crash recovery and startup reconciliation
* add durable lifecycle notifications with per-channel retries
* add DVR health monitoring and diagnostic tooling
* add secure access to recordings, thumbnails, and subtitles
* add WebSocket notifications for recording and rule changes
* add Web UI management for recordings, rules, progress, and task state
* add RBAC, configuration, documentation, and i18n support

Streaming and HLS:

* fix shared-stream idle handling and release dead provider streams correctly
* stop tee streams when both client and cache consumers are gone
* cancel provisioning probes when client streams terminate
* fix transient HLS origin work accounting and intermittent 503 responses
* make stream buffer byte limits configurable
* make shared subscriber idle timeout configurable
* make initial HLS manifest wait timeout configurable
* add configurable TS chunk packet count
* add configurable HLS refresh failure backoff
* centralize redirect limits and retry jitter handling
* improve provider DNS refresh behavior and failover tuning
* preserve UTF-8 characters in catchup templates
* improve stream history validation and persistence error handling

Security:

* use constant-time credential comparisons
* harden library and media path handling against traversal and symlink escapes
* only trust forwarded client IP headers from configured trusted proxies
* redact credentials and sensitive URL data from logs
* reject invalid authentication status-code configuration
* deny users with unresolved plans or invalid content filters
* improve authentication error handling across proxy and HLS endpoints

Configuration and reliability:

* prevent invalid api-proxy.yml reloads from terminating the running server
* fully validate API proxy configuration before persisting changes
* log configuration and EPG cleanup failures instead of silently discarding them
* keep the last valid configuration active after failed hot reloads
* align backend and shared media-server validation
* remove duplicated path and normalization logic
* improve DNS-store recovery and Windows rename fallback handling
* reject invalid duration, timestamp, and numeric conversions safely
* fix playlist bouquet save error handling
* fix provider record update detection
* fix cache boundary handling
* improve startup and persistence failure diagnostics

Filtering, search, sorting, and processing:

* add field-scoped playlist explorer search
* centralize shared stream-history search field definitions
* extend the filter DSL with string, set, and numeric operators
* add EPG ID, channel number, and detected quality as filterable fields
* add filter dry-run preview API with match statistics and samples
* report filter syntax errors with line and column information
* add natural numeric-aware sorting
* add quality-aware channel deduplication
* add accent-independent deduplication
* move natural sorting and quality detection helpers into shared code
* persist explorer search-field selection across reloads

User plans and content access:

* add reusable API user plans for capability tiers
* support inherited cluster and connection limits with per-user overrides
* add plan-level and user-level content filters
* enforce content filters across Xtream, M3U, direct playback, resource access,
  stream info, short EPG, categories, and XMLTV
* add trial plans with automatic expiry and Trial status
* add plan selection and content filtering to the user editor
* add full plan management to the API configuration Web UI
* migrate the API user database to schema V7 with plan and filter persistence

Web UI and accessibility:

* add live logging console to the stats page
* improve login error handling and prevent duplicate authentication requests
* add keyboard navigation to tabs, menus, tables, and search
* add ARIA roles, labels, validation state, and live-region feedback
* add confirmation dialogs for destructive actions
* add unsaved-change warnings and Ctrl/Cmd+S shortcuts
* add loading, progress, empty, and in-flight states across views
* improve dropdown and single-selection behavior
* add clipboard and credential-copy helpers
* persist table pagination and explorer search preferences
* improve error recovery when UI context providers are unavailable
* remove multiple panic-prone unwrap and browser API paths
* replace remaining hardcoded UI strings with translation keys

Maintenance:

* resolve backend and frontend compiler and Clippy warnings
* update packages and test fixtures
* consolidate duplicated helpers and validation logic
* improve documentation for configuration, filters, plans, DVR, and REST APIs
* add and update tests for migrations, filters, deduplication, sorting,
  configuration, streaming, and accessibility behavior
2026-08-21 14:50:12 +02:00
GoldyandGitHub add49abde0 feat(epg): make smart matching deterministic and programme-aware (#821)
* feat(epg): make smart matching deterministic and programme-aware

Centralize XMLTV and ICS candidate ranking, validate matches against programme availability, and reuse populated IDs across normalized stream variants.

Reject ambiguous, numeric-conflicting, cross-country, and decorative matches while respecting source priority and correcting stale IDs. Extend normalization defaults, diagnostics, documentation, and regression tests.

* fix(epg): address smart matching review feedback

Retain directly referenced XMLTV channels without treating empty guides as valid smart-match candidates.

Harden UTF-8 marker stripping, limit guide-name collection, refine decorative entry detection, avoid repeated country parsing, and document the normalization migration path.
2026-08-06 21:38:39 +02:00
euzuandGitHub 52efaaa301 Feature/optimization (#816)
* **Performance**
  * Improved memory usage and persistence speed for large playlists and electronic programme guides.
  * Large EPG datasets now process more reliably while preserving channel priorities and cleaning up temporary data.
  * Reduced allocation overhead during parsing and playlist processing.

* **Bug Fixes**
  * Prevented programme descriptions from being truncated during XMLTV imports.
  * Improved handling of empty or single-source EPG data.

* **Network**
  * Optimized response compression by avoiding compression for small or already-compressed media files.
2026-08-05 15:04:13 +02:00
knylbyteandGitHub 224c9f6f31 feat: add resilient shared HLS master playlists (#805)
* feat: add shared HLS master playlists and recovery
2026-08-01 12:50:52 +02:00
euzuandGitHub 4d8df8f534 M3u catchup fix (#794)
* **New Features**
  * Catch-up streams can now auto-detect whether to serve direct video or an HLS playlist.
  * Added archive-aware HLS session/identity handling and improved upstream user-agent propagation for manifests.
  * Enhanced M3U timeshift/archiving, including nested handling and native Flussonic archive support; Short EPG can advertise archive availability.

* **Bug Fixes**
  * Provider session headers now persist across retries and deferred-open scenarios.
  * Legacy HLS routing is now cache-aware; seek detection improvements.
  * Stalker errors now better redact sensitive URL details.
  * Fix: Preserve VOD client range requests

* **Tests**
  * Expanded coverage for probing, archive/timeshift resolution, header overlay rules, and related routing.
2026-07-27 15:13:10 +02:00
euzuandGitHub 78df42ff28 Added Mapping Stage fpr mapper. (#798)
* **New Features**
  * Added configurable mapping stages for `mapping.yml`: `processing` (default) and `after_epg`.
  * `after_epg` mappings now run after EPG enrichment and can react to enriched EPG fields.
* **Bug Fixes**
  * Stage-aware playlist mapping: if no mappings match, the source is left unconsumed.
  * Mapping directory merges now reject conflicting stages for the same mapping id and report both files clearly.
* **Documentation**
  * Updated mapping DSL and target `processing_order` docs to describe stage timing and guarantees.
* **Tests**
  * Added coverage for stage-restricted mapping behavior, merge conflicts, and AfterEpg timing.
2026-07-22 14:31:19 +02:00
euzuandGitHub ab4031e567 Fix: Mapper counter reset (#795)
Bug Fixes
Fixed playlist counter assignments so values reset correctly during each refresh.
Corrected counter displays to consistently show their configured starting values.
Improved counter comparisons to detect changes in starting values accurately.
2026-07-21 11:21:34 +02:00
euzuandGitHub 9bb1c97d93 Added new EPG tags: Category, new, live (#793)
* Added new EPG tags: Category, new, live
2026-07-20 17:39:50 +02:00
euzuandGitHub f8e8941929 Feature/stalker (#780)
New Features

- Added first-class Stalker/Ministra portal support, including live, VOD, series, playback-link refresh, and bulk EPG ingestion.
- Added Stalker configuration and batch/CSV support in the Web UI.
- Added playlist preview and playback handling for Stalker inputs, with support for partial refreshes.
2026-07-20 14:58:06 +02:00
knylbyteandGitHub c70fbc671e feat: hls content encoding support and shared session between different targets (#789)
* feat: key shared hls sessions by origin id
* feat: support hls content encoding
* fix: coderabbitai findings
* Fix: Custom headers are lost on provider://
In the manual redirect path, the abstract provider:// URL is compared against the resolved HTTP URL.
This causes the request to be marked as "scrubbed" before the first real redirect even occurs, stripping out headers like X-API-Key.
2026-07-15 10:40:30 +02:00
euzuandGitHub 9c34d8e8ca feat: invert staged input connection flow and credentials inheritance (#779)
* feat: invert staged input connection flow
2026-07-13 12:43:25 +02:00
knylbyteandGitHub 18ae03ba1a feat: add EPG output normalization (#785)
* docs: document EPG output normalization

* feat: normalize EPG output
2026-07-11 09:59:23 +02:00
knylbyteandGitHub 9040940674 feat: ics to xmltv exporter (#784)
feat: ics to xmltv exporter
2026-07-10 14:53:33 +02:00
zachhideandGitHub ded3fd14e0 Case-insensitive EPG channel-id matching; stop lowercasing ids in parsers (#783)
Make EPG channel-id matching case-insensitive; stop lowercasing ids in parsers
2026-07-08 16:16:40 +02:00
knylbyteandGitHub dc49189f63 feat: add shared hls cache sessions (#782)
Shared HLS cache session feature and aligns the runtime, cache, provisioning, recovery, custom-response, and documentation paths with the new shared-session model.
2026-07-08 11:52:22 +02:00
euzuandGitHub 75178714c3 Fixed m3u playlist with urls containing query (#781)
- Improved M3U stream handling when providers lack configured credentials
- Enhanced URL extension extraction and stream container type resolution across HLS, XTream, and VOD formats
2026-06-22 20:02:09 +02:00
euzuandGitHub bfcd66ffcc Fix/catchup (#778)
* Fix: setting auth web_ui token_ttl_mins = 0 fixed.
* Fix: catchup
* New: added playlist update log view
* Fix: Landing Page
New: "Last Page"  added for Landing Page selection
2026-06-18 16:03:09 +02:00
euzuandGitHub 9e83d24864 Feature/optimizations (#777)
* perf: binary-search EPG programme lookup
Replaces the linear position() scan with a binary search via partition_point for EPG programmes. Reduces complexity to O(log p).
* perf: cache interned PlaylistItemType label
Avoids repetitive hash-map lookups during sorting and filtering. The five fixed labels are now interned once via OnceLock and returned as a cheap Arc clone.
* perf: avoid per-event String allocation in web-UI XMLTV parser
Uses borrowed Cow types instead of allocating a new String for every element name. Tracks the active text state using a small TextTag enum.
* perf: throttle per-chunk download control poll
Throttles the control_signal lock polling to a 200ms interval on multi-GB downloads to prevent CPU thrashing. Immediate actions (pause/cancel) remain guaranteed via control_notify.
* perf: pre-size filtered channel buffers in apply_filter_to_playlist
Pre-allocates the filtered channel vector based on the source group length. Eliminates step-by-step reallocations on large playlists.
* fix: surface playlist cache load failures instead of silent empty fallback
Replaces silent error swallowing with real error logging (distinguishing missing files from corruption) while preserving the empty fallback behavior.
* perf: remove redundant first drain loop in get_remote_content_as_file
Removes a dead, redundant loop. The stream body is now consumed only once, allowing the idle timeout to protect the transfer correctly.
* perf: back off instead of busy-spinning on empty client-stream chunks
Introduces a short Sleep backoff (Poll::Pending) when a provider sends continuous empty keep-alive chunks. Prevents the CPU from spinning hot.
* perf: make library orphan cleanup linear instead of O(n^2)
Reduces the complexity of cleaning up orphaned entries from O(n^2) to linear O(n). Loads the metadata library only once and pre-computes partitions.
* perf: indexed batched merge for series expansion instead of O(n^2) scans
Replaces expensive O(n^2) scans during series expansion with index-based batch processing. Builds temporary lookup indexes and merges groups linearly.
* perf: pre-size group flatten buffers to reduce reallocation churn
Pre-allocates target merge vectors and category indexes to eliminate repeated memory reallocations when flattening large target playlists.
* perf: stream custom provider playlist endpoint instead of materializing it
Switches from full in-memory materialization to lazy conversion and streaming of JSON/binary responses. Massively reduces the memory footprint.
* refactor: centralize InputType batch/family checks behind enum helpers
Moves scattered matches! checks for M3u/Xtream types into centralized enum helpers (is_batch(), etc.) to prevent logic drift.
* refactor: centralize XMLTV tag/attribute literals into named constants
Replaces hardcoded inline strings in the XMLTV parser with named constants (EPG_TAG_TITLE, etc.) as a single source of truth.
* refactor: derive GeoIpUpdateError Display/Error via thiserror
Replaces manual Display and Error implementations with the thiserror macro, allowing new error variants to self-document their formatting.
* refactor: attach per-cluster facts to XtreamCluster instead of scattered matches
Centralizes redundant API actions and collection name mappings directly onto the XtreamCluster struct instead of using scattered match blocks.
* refactor: centralize PlaylistItemType video/series classification
Introduces is_video() / is_series() on the enum to unify duplicate matches! checks across filters, probes, and tracking modules.
* feat: add per-stage summary logs to VOD/series resolve queueing
Adds a concise debug summary per processing stage (total counters and elapsed time) to make hot-path diagnostics easier without raising the log level.
* refactor: generate ItemField get/set from a single direct-field list
Uses a callback macro to synchronously generate both getter and setter blocks for directly-bound fields (Name, Url, etc.) from a single master list.
* refactor: derive input-type routing from a single capability descriptor
Bundles InputType behaviors (backends, connection rules) into a single capabilities() descriptor to prevent bugs when adding new variants.
* refactor: derive output-format routing from a single capability descriptor
Centralizes output format features (filter, EPG, and cache support) into a single TargetCapabilities descriptor instead of spreading logic across no-op match arms.
2026-06-15 14:09:31 +02:00
euzuandGitHub a2d9c1e076 Feature/user playlist range select and code deduplication (#772)
* refactored some code duplications
* User playlist editor shift+mouse selektion added
* added russion translation
2026-06-06 13:06:28 +02:00
euzuandGitHub 40adbe0d40 catchup handling fix, streaming fix (#771)
* catchup handling fix
2026-06-05 10:00:53 +02:00
Juanjo PresaandGitHub 585efcca47 feat: improve Trakt list curation matching (#747)
* feat: paginate Trakt list fetching

* feat: allow TMDB-only Trakt list matching

* chore: address Trakt review comments

* feat: add public Trakt charts

* fix: keep Trakt category clones distinct

* fix: avoid truncating Trakt chart ranks

* fix: keep Trakt series category episodes

* trakt improvements
2026-06-04 20:07:30 +02:00
euzuandGitHub 4e82330c6a Fix/code duplicates and UI improvements (#769)
* feat(ui): toast progress bar, pause-on-hover, and copy-details for errors

Add a countdown progress bar to auto-dismiss toasts, pause both the timer and bar on hover (resuming with remaining time), and a 'copy details' action on error toasts. Respects prefers-reduced-motion.

* feat(ui): confirm destructive download/recording cancel and remove

Route the download/recording cancel and remove actions through the shared ConfirmDialog (which focuses the safe Cancel button by default), matching the existing confirmation flow for user/target/RBAC deletes.

* feat(ui): runtime-discovered languages with manifest and RTL support

Load available UI languages at runtime from assets/i18n/index.json, add a toolbar language picker (shown when >1 language), persist the choice, and set document dir/lang for RTL languages such as Arabic.

* feat(ui): recoverable error boundary with per-view retry fallback

Add an ErrorBoundary component (context handle + use_error_boundary hook) that shows a recoverable fallback with a retry button instead of blanking a section. Wrap each main view and the API-user playlist individually so a failure in one view stays contained and the rest of the UI keeps working.

* fix(api): use async canonicalize in local file stream handler

Replace the blocking std path.canonicalize() in local_stream_response with tokio::fs::canonicalize().await so the async runtime is not blocked while resolving the local media file path.

* Add Escape-to-close keyboard support for popup menus

Popup menus now close on Escape in addition to outside mouse-down, improving keyboard accessibility.

* Use descriptive alt text for logo and channel logo images

Login and sidebar logo images now use the configured app title, and playlist channel logos use the channel title, improving screen-reader accessibility.

* Add explicit type=button to shared button primitives

IconButton and TextButton now render with type=button to prevent accidental form submission when used inside forms.

* Persist sidebar collapsed state and table page size

The sidebar collapsed/expanded state and the stream-history table page size are now saved to localStorage and restored on reload, matching the already-persisted theme preference.

* Debounce filter editor input parsing

The filter editor textarea no longer re-parses, previews, and emits the filter on every keystroke. The textarea stays responsive via an immediate value while parsing and change notifications are debounced (300ms).

* Show localized message in table empty state

Data/paged tables now render the No content label in their empty state instead of an icon with no text. Sticky headers were already present.

* feat(frontend): improve screen-reader support for sidebar and toasts

* fix(frontend): handle missing window gracefully in sidebar

* feat(frontend): cross-dissolve colors on theme switch

* feat(frontend): add card hover lift, button press feedback, animated chevrons

* Removed code duplicates
2026-06-02 11:16:03 +02:00
euzuandGitHub 3591515187 Issue-766 m3u catchup (#768)
* Issue-766 m3u catchup
2026-06-01 16:56:05 +02:00
euzuandGitHub 4c5d966248 Reduce heap allocation (#764)
- Refactored PlaylistSource to avoid Box<dyn> whre possible
- Some other small heap allocation fixes
2026-05-28 17:58:41 +02:00
Juanjo PresaandGitHub a158b35091 feat: add media enrichment fact patch core (#752)
* feat: add media enrichment fact patch core
2026-05-11 14:41:01 +02:00
Juanjo PresaandGitHub 945308a65b feat: add Plex media-server catalog and playback baseline (#748)
* feat: add Plex media-server catalog baseline
* feat: add Plex media-server playback baseline
2026-05-11 13:38:06 +02:00
euzuandGitHub 4bc2a928a3 Fix: Mapper chno (#751)
Fix: Mapper chno
2026-05-07 09:21:03 +02:00
Juanjo PresaandGitHub 8a2e379f6d feat: add media-server input foundations (#742)
* feat: add remote media input foundations
* fixed macro variable names
* Added todo comment for source editor sidebar
2026-05-04 20:22:51 +02:00
Juanjo PresaandGitHub 15e4857d4c build: remove vendored OpenSSL dependency (#743)
* build: remove vendored OpenSSL dependency
* remvoed unnecessary comments and clippy fixes
2026-05-04 19:07:41 +02:00
euzuandGitHub e4e31d060d epg merge fix (#737)
* epg merge fix
2026-05-01 20:06:29 +02:00
knylbyteandGitHub 3875a1c89b Feature/ffprobe piped from reqwest (#734)
* fix: video and audio deserialization for db dump
* fix: resolve proivder feature for redirect mode
* fix: enable seek feature for ffprobe on large vod and series elements
* fix: keep seekable ffprobe probes bounded
2026-05-01 11:01:24 +02:00
euzuandGitHub 57805eec36 BPlusTree optimizations (#735)
* BPlusTree optimizations
2026-05-01 10:27:13 +02:00
knylbyteandGitHub b51fc105a4 feat: pipe remote ffprobe probes through reqwest (#730)
pipe remote ffprobe probes through reqwest
2026-04-24 09:59:06 +02:00
knylbyteandGitHub ae4c6d988f fix: resolve provider urls before probing (#726)
* fix: resolve provider urls before probing
* fix: avoid live probe url allocation
2026-04-23 07:26:23 +02:00
euzuandGitHub 48eb5a8478 Connection admission state machine (#723)
Connection admission state machine
2026-04-21 15:21:51 +02:00
euzuandGitHub 9eef3b24e0 Feature/filter resolve probe (#720)
* Filter for resolve
* Filter for probe
2026-04-17 11:57:43 +02:00
euzuandGitHub edc0ceb05e Fix: Vod session handling (#717)
* Fix: Vod session handling
* Review fixes
2026-04-13 12:26:44 +02:00
euzuandGitHub 31a48bc1f3 Feature/structured errors landing page (#705)
- structured errors
- landing page
- fix: table header background
2026-04-06 10:20:52 +02:00
zachhideandGitHub 01bf2357bc m3u parser lowercase channel ID fix (#688)
m3u parser forgets to lowercase channel ID causing EPG matching to fail. This change makes it consistent with the Xtream parser and EPG XML parser.
2026-04-02 05:02:01 +02:00
euzuandGitHub c82169542f Fix/hls rewrite css fixes (#685)
* hls uri rewrite fixed
* source editor canvas pan delete icon fix
* css-fixes
* added epg smart match form to input
* staged input fix
* Disable wasm compression
2026-03-31 14:28:43 +02:00
euzuandGitHub bb82798457 Fix/local series episodes (#681)
* Local and provider series uuid generation fixed.
* fixed some local media issues
2026-03-29 15:13:00 +02:00
euzuandGitHub 783c73275e theme refactor, added new themes (#679)
- Theme refactor, added new themes
- Fixed user session cleanup 3h problem
- Fixed sequence sorting with order none
2026-03-28 21:57:13 +01:00
euzuandGitHub 9d35a9cbbe Sorce ordinal by category and channel index (#672)
* Sorce ordinal by category and channel index
* Parsing UserApiRequest from request body or query
* CSS stylings
* media tools refactoring
* xtream info parsing now number/string fields
2026-03-27 15:23:39 +01:00
euzuandGitHub 69e7ae8680 Feature/local media (#671)
* local library default extensions
* series info generation
* local library series episodes
2026-03-26 23:32:22 +01:00
euzuandGitHub a32a503e20 Fix: local media path (#669)
* Fix: local media path
* Fix: xmltv api post request
2026-03-25 20:43:41 +01:00
euzuandGitHub 2fccbb66e5 Fix/scheduled updates logger initialization zombie connections (#664)
* fix: Scheduler preserve forced_targets across config reloads.
hot reload could cause loosing scheduler task targets.

warn logs for:
- process_source: warns when all inputs are disabled for given targets
- process_sources: warns when no sources were processed at all

* Fix: Logger initialization

* Fix: TCP USER TIMEOUT for linux. If a client disrupts the connection, the tcp layer will hold it approx for 5-15 minutes. With this setting we can close in 30 seconds under linux
2026-03-24 23:24:57 +01:00
euzuandGitHub ab1c2217e0 Fix/resolve task enque (#657)
- Source Editor readonly view
- Resolve task fix for series
2026-03-20 17:27:59 +01:00
euzuandGitHub 66915a306d Feature/rbac (#656)
* RBAC implementation
* Schedules config edit mode
2026-03-20 15:31:19 +01:00
euzuandGitHub e367f1fe7c - Fix: resolve task database problem (#654)
- Fix: resolve task  database problem
- Fix: m3u parsing when staged input delivers virtual id
- provider id extraction from url refactored
- some optimizations for hashutils
2026-03-19 12:49:45 +01:00