Commit graph

1008 commits

Author SHA1 Message Date
Dispatcharr
5223b1862d Merge branch 'dev' into FUSE-fs 2026-02-19 13:11:24 -06:00
Dispatcharr
db5c7c7040 FUSE
Moved fuse client to fuse app
Added client detection
Added connect token
2026-02-19 12:38:56 -06:00
SergeantPanda
1503127f61
Merge pull request #983 from CodeBormen/fix/962-VOD-proxy-connection-counter-leak-on-client-disconnect
Fix: VOD proxy connection counter leak on client disconnect
2026-02-19 11:32:20 -06:00
None
58ccf2d6e1 Fix: VOD proxy connection counter leaks on client disconnect and seeking
Fix multiple VOD proxy connection counter leak paths that caused
profile_connections to remain permanently elevated after client
disconnects, leaving profiles locked at capacity.

Changes:
- Fix get_stream() race condition: save state under lock with fresh active_streams to prevent overwriting concurrent decrements during scrubbing/seeking (root cause of counter stuck after timeshift)
- Add early active_streams increment in session reuse path to prevent cleanup race between GeneratorExit and new request
- Add rollback on get_stream() returning None (range not satisfiable)
- Add profile_id fallback to closure variable when Redis state is deleted before generator cleanup runs
- Change increment/decrement return types and add warning logs for lock acquisition and state failures
- Clean up debug traceback logging from increment/decrement methods
2026-02-17 20:24:00 -06:00
SergeantPanda
47853bdb5b Enhancement: Added optional subtitle template field to custom dummy EPG configuration. Users can now define subtitle patterns using extracted regex groups and time/date placeholders (e.g., {starttime} - {endtime}). (Closes #942) 2026-02-17 12:00:24 -06:00
SergeantPanda
ac1b43445e
Merge pull request #946 from CodeBormen/fix/945-XC-profile-refresh-extract-wrong-credentials
Fix XC URL sub-path handling in profile refresh and EPG creation
2026-02-16 16:04:53 -06:00
SergeantPanda
b1cb70c5d2
Merge pull request #975 from Dispatcharr/connect
Feature: Connect
2026-02-16 15:27:56 -06:00
SergeantPanda
968551c1a6 Enhancement: M3U generation for Xtream Codes API endpoints now use proper XC-style stream URLs (/live/username/password/channel_id) instead of UUID-based stream endpoints, ensuring full compatibility with XC clients. (Fixes #839) 2026-02-16 13:45:57 -06:00
SergeantPanda
717cce92ec
Merge branch 'dev' into cron-scheduling 2026-02-16 10:55:33 -06:00
dekzter
55a5180ee1 hardening of script handling with configurable variables - making script execution more secure 2026-02-15 07:37:00 -05:00
dekzter
45d0f180fe added endpoint for testing connections with a dummy payload 2026-02-15 07:36:08 -05:00
None
4842bb87fa Fix: VOD proxy connection counter leak on client disconnect
Three fixes:
- TOCTOU: Replace GET-check-INCR with atomic INCR-first-then-check pattern in both connection managers to prevent concurrent requests exceeding max_streams
- Immediate DECR: Decrement profile counter directly in stream generator exit paths (normal completion, client disconnect, error) instead of deferring to daemon thread cleanup which may never execute
- Rollback: Decrement profile counter on create_connection() failure so the reserved slot is released

Fixes #962
2026-02-13 19:37:06 -06:00
SergeantPanda
fb2f156fd8 Bug Fix: Fixes a bug with auto channel sync where channel numbers could be duplicated if multiple groups overlapped. 2026-02-13 15:07:24 -06:00
SergeantPanda
2c9f6d7360 Enhancement: For auto channel sync, allow using provider number, fixed start number or next available. (Closes #956, #433) 2026-02-13 14:34:22 -06:00
dekzter
e030906cdd more supported events, better UI (columns) for events in connection editor 2026-02-13 12:20:40 -05:00
dekzter
1236d3968f forgot dangling import 2026-02-13 12:02:33 -05:00
dekzter
3b0a890e94 fixed circular import 2026-02-13 11:48:59 -05:00
Dispatcharr
9af7077202 Merge branch 'dev' into FUSE-fs 2026-02-12 20:19:53 -06:00
dekzter
fe9854c522 more supported events 2026-02-12 19:28:43 -05:00
SergeantPanda
890992a9f9 feat(scheduling): add cron builder and refactor scheduling components (Closes #165)
Add cron expression support for M3U and EPG refreshes with interactive
builder modal and quick reference examples. Refactor backup scheduling
to use shared ScheduleInput component for consistency.

- New CronBuilder modal with preset buttons and custom field editors
- Info popover with common cron expression examples
- Shared ScheduleInput component for interval/cron toggle
2026-02-12 18:08:13 -06:00
dekzter
bc72ea7310 merged in dev 2026-02-11 19:51:21 -05:00
dekzter
e6ffeb19de added event support to plugins 2026-02-11 19:50:11 -05:00
Matt Grutza
bc231b3f64
Merge branch 'Dispatcharr:main' into fix/945-XC-profile-refresh-extract-wrong-credentials 2026-02-10 17:52:07 -06:00
SergeantPanda
1df802341d
Merge pull request #937 from CodeBormen:Feature/Support-External-Redis-Auth
feat: Add Redis authentication support for modular deployment
2026-02-09 17:29:38 -06:00
dekzter
24f812dc4d initial connect feature 2026-02-08 09:29:22 -05:00
None
8de23eec35 Fix XC URL sub-path handling in profile refresh and EPG creation
- Fix credential extraction in get_transformed_credentials() using negative
  indices anchored to the known tail structure instead of hardcoded indices
  that break when server URLs contain sub-paths
- Fix EPG URL construction in M3U form to normalize server URL to origin
  before appending xmltv.php endpoint

XC accounts with sub-paths in their server URL (e.g., http://server.com/portal/a/) caused two failures: profile refresh extracted wrong credentials from the URL path due to hardcoded array indices, and EPG auto-creation appended xmltv.php under the sub-path instead of at the domain root. Both fixes normalize away the sub-path using the same approach the backend's XCClient already uses for API calls.
2026-02-05 20:55:52 -06:00
Dispatcharr
78a53e03db Plugin fixes/updates
Some checks failed
CI Pipeline / prepare (push) Has been cancelled
Build and Push Multi-Arch Docker Image / build-and-push (push) Has been cancelled
Frontend Tests / test (push) Has been cancelled
CI Pipeline / docker (amd64, ubuntu-24.04) (push) Has been cancelled
CI Pipeline / docker (arm64, ubuntu-24.04-arm) (push) Has been cancelled
CI Pipeline / create-manifest (push) Has been cancelled
Added password fields - #616
Fixed multiple GUI issues - #494
Adds some QoL upgrades
See CHANGELOG.md for more info
2026-02-05 20:05:29 -06:00
SergeantPanda
21b7303e60 Bug fix: Fixed EPG filtering issues where short EPG requests had no time-based filtering (returning expired programs) and regular EPG requests used start_time__gte (missing the currently playing program). Both now correctly use end_time__gt to show programs that haven't ended yet, with short EPG additionally limiting results. 2026-02-05 14:42:31 -06:00
SergeantPanda
634f4a75a1
Merge pull request #931 from jcasimir:fix-backup-scheduler-test
Fix backup scheduler test to match actual defaults
2026-02-05 13:58:27 -06:00
SergeantPanda
de81dc6c80 Enhancement: Refactored app initialization to prevent redundant execution across multiple worker processes. Created dispatcharr.app_initialization utility module with should_skip_initialization() function that prevents custom initialization tasks (backup scheduler sync, developer notifications sync) from running during management commands, in worker processes, or in development servers. This significantly reduces startup overhead in multi-worker deployments (e.g., uWSGI with 10 workers now syncs the scheduler once instead of 10 times). Applied to both CoreConfig and BackupsConfig apps. 2026-02-05 13:48:01 -06:00
SergeantPanda
da5fbb1f5c Change backup schedule initialization to support gunicorn as well.
Some checks are pending
CI Pipeline / prepare (push) Waiting to run
CI Pipeline / docker (amd64, ubuntu-24.04) (push) Blocked by required conditions
CI Pipeline / docker (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
CI Pipeline / create-manifest (push) Blocked by required conditions
Build and Push Multi-Arch Docker Image / build-and-push (push) Waiting to run
2026-02-04 17:33:18 -06:00
SergeantPanda
e26c1908c5 Bug Fix: Automatic backups not enabled by default on new installations: Added backups app to INSTALLED_APPS and implemented automatic scheduler initialization in BackupsConfig.ready(). The backup scheduler now properly syncs the periodic task on startup, ensuring automatic daily backups are enabled and scheduled immediately on fresh database creation without requiring manual user intervention. 2026-02-04 16:56:11 -06:00
None
e217960500 feat: Add Redis authentication support for modular deployment
Add support for authentication when connecting to external Redis instances in modular deployment mode. This enables secure Redis deployments using either password-only authentication (Redis <6) or
username + password authentication (Redis 6+ ACL).

Changes:
- Add REDIS_PASSWORD and REDIS_USER environment variables
- Implement URL encoding for special characters in passwords
- Update all Redis connection points to support auth
- Add comprehensive documentation and examples to docker-compose.yml
- Maintains full backward compatibility (empty defaults = no auth)

All authentication mechanisms have been fully tested including pasword-only authentication, Redis 6+ ACL authentication with username + password, volume-mounted configuration files, and special character handling.

Existing deployments are not effected, authentication support is entirely opt-in using docker-compose.

Also, acknowledging the fact that the docker-compose file for modular deployments has been getting out of hand with auth support, the docker-compose.yml file was re-formatted for better visibility in configuration. This seemed like a better way to go than mandating a .env file.
2026-02-03 21:42:06 -06:00
SergeantPanda
027d114299 Enhancement: XtreamCodes Authentication Optimization: Reduced API calls during XC refresh by 50% by eliminating redundant authentication step. This should help reduce rate-limiting errors.
Some checks failed
Base Image Build / prepare (push) Has been cancelled
CI Pipeline / prepare (push) Has been cancelled
Build and Push Multi-Arch Docker Image / build-and-push (push) Has been cancelled
Frontend Tests / test (push) Has been cancelled
Base Image Build / docker (amd64, ubuntu-24.04) (push) Has been cancelled
Base Image Build / docker (arm64, ubuntu-24.04-arm) (push) Has been cancelled
Base Image Build / create-manifest (push) Has been cancelled
CI Pipeline / docker (amd64, ubuntu-24.04) (push) Has been cancelled
CI Pipeline / docker (arm64, ubuntu-24.04-arm) (push) Has been cancelled
CI Pipeline / create-manifest (push) Has been cancelled
2026-02-03 12:16:31 -06:00
SergeantPanda
6fb4d42022
Merge pull request #894 from CodeBormen/Feature/771-Auto-Matching-Improvments
Feature/771 auto matching improvements
2026-02-03 10:20:45 -06:00
Jeff Casimir
5c4a4580d6 Fix backup scheduler test to match actual defaults
The test expected enabled=False and retention_count=0, but commit
5371519d intentionally changed these defaults to enabled=True and
retention_count=3. Update test to match the intended behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:34:01 -07:00
None
d7b98fef8d Add default/advanced mode toggle and test coverage for EPG matching
Enhanced EPG matching UX by adding radio button toggle to more clearly define optional advanced options. Also added test coverage for stability.

Frontend Changes:
- Added radio button UI to EPGMatchModal for default/advanced mode selection
- Default mode: Uses built-in normalization
- Advanced mode: Shows TagsInput fields for custom prefixes/suffixes/strings
- Mode persists across sessions and settings are preserved when switching modes

Test Coverage:
- Created EPGMatchModal.test.jsx with test cases covering:
  - Component rendering and mode switching
  - Form submission and settings persistence
  - Error handling and UI text variations

- Added test cases to SettingsUtils.test.js for EPG mode handling:
  - epg_match_mode routing to epg_settings group
  - Settings creation and preservation

Since advanced settings are saved persistently but ignored when default settings are used, this adds an easy way in the future to add additional advanced settings to EPG matching like  region influence, match aggression, and match preview, since users can easily switch between modes.
2026-01-31 23:11:20 -06:00
SergeantPanda
da598d3b33 Missed migration for previous feature. 2026-01-31 21:26:34 -06:00
SergeantPanda
0172a7cc00 Merge branch 'dev' of https://github.com/Dispatcharr/Dispatcharr into pr/CodeBormen/894 2026-01-31 19:47:57 -06:00
SergeantPanda
efe915a9b3
Merge pull request #904 from CodeBormen/Feature/866-Search-Filter-Sort-streams-by-TVG-ID
Feature/866 Add TVG-ID column with filter and sort to Streams table
2026-01-31 19:31:48 -06:00
SergeantPanda
9ffd595c96 Enhancement: Added stream_id (provider stream identifier) and stream_chno (provider channel number) fields to Stream model. For XC accounts, the stream hash now uses the stable stream_id instead of the URL when hashing, ensuring XC streams maintain their identity and channel associations even when account credentials or server URLs change. Supports both XC num and M3U tvg-chno/channel-number attributes. 2026-01-31 17:47:46 -06:00
None
f8ec970561 Add TVG-ID column with filter and sort to Streams table
Changes:

- frontend/src/components/tables/StreamsTable.jsx

Added TVG-ID column to streams table
Added search filter input in column header
Added sort button for ascending/descending order
Column follows same pattern as Name, Group, and M3U columns

- apps/channels/api_views.py

Added TVG-ID to filterable fields
Added TVG-ID to sortable fields
Enables backend support for search and sorting

Users can now view, search, and sort streams by their TVG-ID directly in the Streams table. Fulfills #866
2026-01-30 23:37:39 -06:00
None
325f8f4257 Merge remote-tracking branch 'upstream/dev' into Feature/771-Auto-Matching-Improvments 2026-01-29 19:24:44 -06:00
Matt Grutza
52b0c7ca26
Merge branch 'Dispatcharr:main' into Feature/771-Auto-Matching-Improvments 2026-01-29 18:22:09 -06:00
None
37a2a7b52b fix: Escape XML special characters in EPG channel IDs
Fixed XML parsing errors in EPG output when channel IDs contain special
characters.

Changes:

- Added html.escape() to apps/output/views.py where
  channel_id is used in XML attributes

- Added unit tests in apps/output/tests.py to validate XML
  escaping for &, <, >, and " characters
2026-01-28 20:15:03 -06:00
SergeantPanda
5364123745 - Swagger/OpenAPI Migration: Migrated from drf-yasg (OpenAPI 2.0) to drf-spectacular (OpenAPI 3.0) for API documentation. This provides:
- Native Bearer token authentication support in Swagger UI - users can now enter just the JWT token and the "Bearer " prefix is automatically added
  - Modern OpenAPI 3.0 specification compliance
  - Better auto-generation of request/response schemas
  - Improved documentation accuracy with serializer introspection
2026-01-27 13:33:33 -06:00
SergeantPanda
2abe07fe1c Update Series Rules API Swagger Documentation to include required items parameter for TYPE_ARRAY schemas 2026-01-27 10:56:04 -06:00
SergeantPanda
497bb819b9 Docs: Added comprehensive Swagger/OpenAPI documentation for all series-rules endpoints 2026-01-27 09:50:27 -06:00
Matt Grutza
a1fa737ccd Update verbiage 2026-01-25 22:08:32 -06:00
Matt Grutza
8d69fd9374 Add configurable EPG matching normalization settings (Feature #771)
Implements user-configurable string removal for EPG matching to improve channel-to-EPG
association accuracy. Settings are non-destructive and only affect EPG matching
normalization, never modifying actual channel display names.
2026-01-25 22:05:28 -06:00