Commit Graph
57 Commits
Author SHA1 Message Date
DarkBreakpoint 67d75d7ab4 docs(dvr): correct the operator reference and repoint the doctor
The documentation described a system that no longer exists, and in two
places described the opposite of what the code now does.

- The layout section documented `<recording-root>/users/<owner-id>/<rel>`
  for private recordings and `shared/<rel>` for shared ones. That resolver
  was deleted: recordings are stored owner-independently at
  `<recording-root>/<rel>`, because one physical file is shared by every
  user who asked for it. The organised layouts and the component
  sanitisation rules are now documented as they are implemented.

- The config reference claimed persisted queue recovery "is tolerant of
  corruption" and "starts with an empty transfer queue instead of aborting
  server boot". The queue now fails closed: a damaged database is rebuilt
  from the recovery history, and a database ahead of every surviving
  history refuses to start. An operator following the old text would have
  expected silent recovery from a condition that is deliberately fatal.

- `download.read` / `download.write` were still listed as grantable
  permissions after their removal, and `recording.write` after its split.

bin/dvr_doctor.sh looked for `downloads_state.json` and summarised it with
jq. That file never existed under this name, and the queue it stood for is
now a B+Tree, so the section printed "(absent)" and skipped its summary
exactly when an operator needed it. It now reports the repository and its
recovery generations: the CURRENT pointer, the retained generation pair,
journal sizes, the fail-closed case where a database has no history, and a
warning when the recovery directory shares a filesystem with the database
— which survives a corrupt file but not the loss of the volume it exists
to protect against.

CHANGELOG records the three breaking changes: the non-migrating queue, the
permission split, and the moved recording files.
2026-09-01 09:23:52 -05:00
DarkBreakpoint 5561ff7690 feat(auth)!: split recording.write into create, manage and delete
A single write permission could not express the policy the DVR needs: a
user who may request a recording is not necessarily one who may cancel
someone else's, and neither implies the right to delete a file. Replace it
with recording.create, recording.manage and recording.delete, and map each
action onto the one it actually needs:

- create private/shared          -> recording.create
- edit, cancel, manage rules     -> recording.manage
- delete, system retention sweep -> recording.delete

The split renumbers every permission bit above recording.read, so
CURRENT_PERMISSION_SCHEMA_VERSION is bumped to 4 and tokens issued earlier
fail closed at the validator instead of having their bits reinterpreted.
The removed recording.write name now decodes to nothing, so a groups file
that still lists it loses the permission rather than silently gaining one
of the three replacements.

Permission bit values are frozen in a test: they are the wire format, and
reordering the enum would reinterpret every issued token.
2026-08-31 15:30:39 -05:00
euzu 3d42c7ab9e DVR Feature 2026-08-28 19:17:39 +02:00
euzuandGitHub 9ec775b35b Feature/multi crate (#837)
Refactored to multi crate project
2026-08-27 15:36:23 +02:00
euzuandGitHub 1afbe7cca5 health check fix (#832)
New Features

    Added a /ready readiness endpoint with clear initializing, exhausted, and ready states.
    Improved health-banner behavior for shared provider capacity, disabled providers, aliases, and idle fallback capacity.

Bug Fixes

    Improved capacity calculations with shared provider grouping, overflow-safe totals, and empty-capacity handling.

Documentation

    Documented liveness, readiness, and detailed status endpoints, including Docker and orchestrator usage.
2026-08-22 18:52:19 +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
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 576e865239 xtream expiry date handling (#809)
* **New Features**
  * Added automatic Xtream account expiration refresh in server mode: periodic per-panel checks refresh missing/soon-expiring `exp_date`, persist updates with timestamped backups and atomic writes, and disable accounts reported as expired (no automatic re-enable).
* **Bug Fixes**
  * Improved configuration reload by batching pending write triggers with more reliable internal vs external write detection and better failure reporting.
  * Prevented arithmetic overflow in SSDP M-SEARCH delay calculation.
  * Hardened config backup handling and improved CSV alias batch expiration updates with more robust ACL preservation.
* **Documentation**
  * Updated `exp_date` guidance to describe the automatic Xtream expiration refresh behavior and persistence.
2026-07-30 14:57:54 +02:00
euzuandGitHub c47cf99f99 QOS compacting (#804)
- **New Features**
  - Added configurable QoS snapshot compaction to periodically reclaim storage from expired snapshots.
  - Compaction runs daily by default and can be disabled by setting the interval to `0`.
  - QoS config hot-reload now recognizes compaction interval changes.
  - Older saved snapshot checkpoints remain compatible with the new setting.
- **Documentation**
  - Updated configuration examples and reverse-proxy QoS documentation to include `compaction_interval_secs`, its default, and disable behavior.
2026-07-29 18:45:55 +02:00
euzuandGitHub 42e4c72608 STRM title/filename can now selected from header or metadata. (#803)
* **New Features**
  * Added a STRM export option to control whether generated folder/file names use media metadata or the processed title.
  * STRM naming now prefers the processed title by default; enabling the option switches to metadata-derived names.
  * Added a UI chip/tag and editor control for the setting.

* **Documentation**
  * Updated STRM configuration docs with the new option, its default, and its effect.
  * Added localization text for the setting in supported languages.

* **Tests**
  * Added/updated tests to verify filename behavior for videos and series with and without the option.
2026-07-29 16:01:24 +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 fa87a65c9f Feature/hls disable (#800)
* **New Features**
  * Added **Force MPEG-TS** / `disable_hls_streaming` for Xtream live streams, rewriting live `.m3u8` requests to `.ts`.
  * Added UI controls and option indicators, with localized labels in English, Arabic, and Russian.

* **Documentation**
  * Clarified MPEG-TS behavior and added an Xtream example configuration.

* **Bug Fixes**
  * Improved live-stream playback routing/extension handling and related permission-failure responses.
  * Refined provider allocation and grace-period handling for more consistent connection admission.
2026-07-23 15:37:14 +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 fa514031d6 Fixed input form state (#797)
Bug Fixes
- Input forms now consistently update when switching between configured sources.
- Improved filter matching for captions/titles and more accurate type handling for live/video/series (including series-info variants).

New Features
- Mapping DSL now supports reading @input and @type as metadata sources, while rejecting assignments to them.
- Regex capture results are now more consistently exposed across captures (by index and name).

Tests
- Added WASM browser coverage for input switching and updated coverage for filter/mapping behavior.

Documentation
- Updated mapping DSL documentation and changelog to reflect @input/@type read-only behavior and capture access rules.
2026-07-22 11:18:46 +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 a63e6e4ca5 docs: updatet docker templates and added iptv-org-epg template (#790) 2026-07-15 12:52:16 +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
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 c2ff914506 Feature/custom video stream disable (#775)
* custom Video stream disable with configurable http status code
2026-06-09 16:53:09 +02:00
euzuandGitHub c1f0063e07 Feature/show local time (#773)
* Fixed sanitizing url scheme batch and provder
* local date in Stream history
* Fixed EPG programme time display to render in local timezone for improved readability.
* Improved stream history date range filtering to accurately use local date boundaries.
* Enhanced credential sanitization for stream URLs to properly mask sensitive information.
* Fix EPG path selection for mixed Xtream/M3U targets
* Fix EPG selection and complete Xtream series_info for input/custom requests
* Add configurable interner GC tuning
2026-06-08 11:55:51 +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 3591515187 Issue-766 m3u catchup (#768)
* Issue-766 m3u catchup
2026-06-01 16:56:05 +02:00
euzuandGitHub 1a7f2db080 reconnect refactor (#758)
* reconnect refactor
2026-05-14 22:43:05 +02:00
euzuandGitHub 3a9db8e0ac Fix: Session handling (#757)
Fix stream session problems
2026-05-13 09:01:26 +02:00
euzuandGitHub 4bc2a928a3 Fix: Mapper chno (#751)
Fix: Mapper chno
2026-05-07 09:21:03 +02:00
Juanjo PresaandGitHub f967c8a8e9 Remove Plex STRM export style (#740)
* Remove Plex STRM export style
* Address STRM removal review feedback
* test: cover STRM TMDB marker variants
* docs: add Plex STRM breaking change note
2026-05-04 12:52:06 +02:00
euzuandGitHub 57805eec36 BPlusTree optimizations (#735)
* BPlusTree optimizations
2026-05-01 10:27:13 +02:00
euzuandGitHub eb2a017fa3 Network access restriction for api user (#728)
* Network access restriction for api user
* Fixed strm provider:// url bug
2026-04-23 21:15:59 +02:00
euzuandGitHub 5f2d2c8b50 Feature/stream display (#725)
* Added User comment to stream display
*Added EPG to stream display
* Added Stream display hide fields config
* fixed live/vod session ttl bug
2026-04-22 17:58:33 +02:00
knylbyteandGitHub 81ca391ac4 feat: add per-user output clusters (#722)
add per-user output clusters
2026-04-21 19:45:53 +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 ea17f4ac09 Added new connectoin admission rules (#715)
* Added new connectoin admission rules
- evict_user_lastest
- evict_user_oldest
2026-04-11 23:27:43 +02:00
euzuandGitHub 5dd7f2dc91 Connection Admission (#710)
* Connection admission
* Fetch assets with version
* Dockerfile udate
2026-04-10 14:56:57 +02:00
euzuandGitHub f002983bd8 Runtime Config log (#713)
* Runtime Config log
2026-04-10 14:29:30 +02:00
euzuandGitHub 02ac40f592 Feature/provider url selection strategy (#712)
* Input provider url selection strategy
* CVD friendly theme
* Fix: HLS Stream session info  duration and total trasferred data
2026-04-10 11:32:56 +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
euzuandGitHub 9ce3e7a313 Feature/download (#700)
- Download manager
- Stream history fixes
- Stream history docs updated
2026-04-03 16:23:15 +02:00
euzuandGitHub 6c32deb4c3 Stream History (#667)
Stream history qos
2026-04-02 20:03:49 +02:00
euzuandGitHub 2cbff3d3a1 Fix: Copy url in frontend does not resolve provider:// (#673)
* Fix: Copy url in frontend does not resolve provider://
* Fix: Filter editor on demand validation
* Fix: redirect to login screen if auto logout happens
2026-03-27 20:05:50 +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 bd98921fe1 Fix/logging local library schduled targets (#670)
* Reverted wrongly merged logging changes
* Metadata Classifier respects now configured content type
* Fixed hot reload scheduled target mix up
* logging post request
* Series Episode classifier fallback handling
2026-03-26 12:27:47 +01:00
jojo141185andGitHub 0a763247ff docs: major overhaul and structural refactoring of Tuliprox documentation #2 (#668)
* docs: overhaul introduction and architecture guide

- Rewrite index.md into a comprehensive Operator Manual
- Add detailed explanation of the System Architecture (Rust/WASM)
- Document core unique features: Session Holding, Grace Periods, and Shared Streams
- Add Metadata Enrichment details (TMDB, PTT, and FFprobe)
- Implement Mermaid sequence diagram for Network Flow Architecture
- Update documentation map with new link structure

* docs: refactor deployment guides into installation and build manuals

- Split deployment.md into installation.md and build-and-deploy.md
- Add comprehensive Docker Compose examples and volume explanations
- Document image variants (scratch vs. alpine) for DevSecOps best practices
- Expand on cross-compilation (MUSL, ARM, Windows) and WASM toolchains
- Add documentation for the "Docker Container Templates" ecosystem (Traefik, Gluetun, CrowdSec)
- Update CLI argument reference table
2026-03-25 22:31:21 +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