Commit graph

939 commits

Author SHA1 Message Date
DawtCom
c970cfcf9a Move caching to client to remove burden on dispatch server 2026-01-18 00:49:17 -06:00
SergeantPanda
d0ed682b3d Bug Fix: Fixed bulk channel profile membership update endpoint silently ignoring channels without existing membership records. The endpoint now creates missing memberships automatically (matching single-channel endpoint behavior), validates that all channel IDs exist before processing, and provides detailed response feedback including counts of updated vs. created memberships. Added comprehensive Swagger documentation with request/response schemas.
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-01-13 15:43:44 -06:00
Marc DellaVolpe
6607cef5d4 fix bulk update error on unmatched first entry, add tests to cover bulk update api 2026-01-13 15:05:40 -05:00
SergeantPanda
36967c10ce Refactor CoreSettings to use JSONField for value storage and update related logic for proper type handling. Adjusted serializers and forms to accommodate new data structure, ensuring seamless integration across the application. 2026-01-13 12:18:34 -06:00
SergeantPanda
4bfdd15b37 Bug Fix: Fixed PostgreSQL backup restore not completely cleaning database before restoration. The restore process now drops and recreates the entire public schema before running pg_restore, ensuring a truly clean restore that removes all tables, functions, and other objects not present in the backup file. This prevents leftover database objects from persisting when restoring backups from older branches or versions. Added --no-owner flag to pg_restore to avoid role permission errors when the backup was created by a different PostgreSQL user.
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-01-12 16:38:20 -06:00
SergeantPanda
f821dabe8e Enhancement: Users can now rename existing channel profiles and create duplicates with automatic channel membership cloning. Each profile action (edit, duplicate, delete) in the profile dropdown for quick access. 2026-01-12 11:29:33 -06:00
SergeantPanda
edfa497203 Enhancement: Channel Profile membership control for manual channel creation and bulk operations: Extended the existing channel_profile_ids parameter from POST /api/channels/from-stream/ to also support POST /api/channels/ (manual creation) and bulk creation tasks with the same flexible semantics:
- Omitted parameter (default): Channels are added to ALL profiles (preserves backward compatibility)
  - Empty array `[]`: Channels are added to NO profiles
  - Sentinel value `[0]`: Channels are added to ALL profiles (explicit)
  - Specific IDs `[1, 2, ...]`: Channels are added only to the specified profiles
  This allows API consumers to control profile membership across all channel creation methods without requiring all channels to be added to every profile by default.
2026-01-11 17:31:15 -06:00
SergeantPanda
a84553d15c Enhancement: Stale status indicators for streams and groups: Added is_stale field to both Stream and ChannelGroupM3UAccount models to track items in their grace period (seen in previous refresh but not current). 2026-01-09 13:53:01 -06:00
SergeantPanda
cc9d38212e Enhancement: Groups now follow the same stale retention logic as streams, using the account's stale_stream_days setting. Groups that temporarily disappear from an M3U source are retained for the configured retention period instead of being immediately deleted, preserving user settings and preventing data loss when providers temporarily remove/re-add groups. (Closes #809) 2026-01-09 12:03:55 -06:00
SergeantPanda
caf56a59f3 Bug Fix: Fixed manual channel creation not adding channels to channel profiles. Manually created channels are now added to the selected profile if one is active, or to all profiles if "All" is selected, matching the behavior of channels created from streams.
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-01-09 10:41:04 -06:00
SergeantPanda
ba5aa861e3 Bug Fix: Fixed Channel Profile filter incorrectly applying profile membership filtering even when "Show Disabled" was enabled, preventing all channels from being displayed. Profile filter now only applies when hiding disabled channels. (Fixes #825) 2026-01-09 10:26:09 -06:00
SergeantPanda
01370e8892 Bug fix: Fixed duplicate key constraint violations by treating TMDB/IMDB ID values of 0 or '0' as invalid (some providers use this to indicate "no ID"), converting them to NULL to prevent multiple items from incorrectly sharing the same ID. (Fixes #813)
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-01-07 16:38:09 -06:00
SergeantPanda
30d093a2d3 Fixed bulk_create and bulk_update errors during VOD content refresh by pre-checking object existence with optimized bulk queries (3 queries total instead of N per batch) before creating new objects. This ensures all movie/series objects have primary keys before relation operations, preventing "prohibited to prevent data loss due to unsaved related object" errors. (Fixes #813)
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-01-06 16:12:50 -06:00
SergeantPanda
16bbc1d875 Refactor forms to use react-hook-form and Yup for validation
- Replaced Formik with react-hook-form in Logo, M3UGroupFilter, M3UProfile, Stream, StreamProfile, and UserAgent components.
- Integrated Yup for schema validation in all updated forms.
- Updated form submission logic to accommodate new form handling methods.
- Adjusted state management and error handling to align with react-hook-form's API.
- Ensured compatibility with existing functionality while improving code readability and maintainability.
2026-01-04 20:40:16 -06:00
SergeantPanda
9612a67412 Change: VOD upstream read timeout reduced from 30 seconds to 10 seconds to minimize lock hold time when clients disconnect during connection phase
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-01-04 15:21:22 -06:00
SergeantPanda
4e65ffd113 Bug fix: Fixed VOD profile connection count not being decremented when stream connection fails (timeout, 404, etc.), preventing profiles from reaching capacity limits and rejecting valid stream requests 2026-01-04 15:00:08 -06:00
SergeantPanda
6031885537 Bug Fix: M3UMovieRelation.get_stream_url() and M3UEpisodeRelation.get_stream_url() to use XC client's _normalize_url() method instead of simple rstrip('/'). This properly handles malformed M3U account URLs (e.g., containing /player_api.php or query parameters) before constructing VOD stream endpoints, matching behavior of live channel URL building. (Closes #722) 2026-01-04 14:36:03 -06:00
SergeantPanda
1a67f3c8ec Merge branch 'dev' of https://github.com/Dispatcharr/Dispatcharr into pr/patchy8736/796 2026-01-02 09:53:54 -06:00
SergeantPanda
6bd8a0c12d Enhance error logging for invalid season and episode numbers in batch_process_episodes 2026-01-02 09:53:45 -06:00
SergeantPanda
33f988b2c6
Merge pull request #784 from Vitekant:fix/vod-category-pipe-parsing
Fix VOD category filtering for names containing pipe "|" characters
2026-01-01 18:28:07 -06:00
patchy8736
c57f9fd7e7 Fix episode processing issues in VOD tasks
- Ensure season and episode numbers are properly converted to integers with error handling
- Remove zero-padding from debug log format for season/episode numbers
- Add validation to filter out relations with unsaved episodes that have no primary key
- Add proper logging for skipped relations when episode is not saved to database

These changes address potential crashes when API returns string values instead of integers
and prevent database errors when bulk creation operations fail silently due to conflicts.

Fixes issue #770
2026-01-01 15:57:27 +01:00
SergeantPanda
57a6a842b2 Bug Fix/Enhancement:
Some checks failed
CI Pipeline / prepare (push) Has been cancelled
Build and Push Multi-Arch Docker Image / build-and-push (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
- M3U and EPG URLs now correctly preserve non-standard HTTPS ports (e.g., `:8443`) when accessed behind reverse proxies that forward the port in headers — `get_host_and_port()` now properly checks `X-Forwarded-Port` header before falling back to other detection methods (Fixes #704)
- M3U stream URLs now use `build_absolute_uri_with_port()` for consistency with EPG and logo URLs, ensuring uniform port handling across all M3U file URLs
2025-12-27 09:57:36 -06:00
SergeantPanda
f1c096bc94 Bug Fix: XtreamCodes M3U files now correctly set x-tvg-url and url-tvg headers to reference XC EPG URL (xmltv.php) instead of standard EPG endpoint when downloaded via XC API (Fixes #629) 2025-12-27 08:19:58 -06:00
Vitek
5a4be532fd Fix VOD category filtering for names containing pipe characters
Use rsplit('|', 1) instead of split('|', 1) to split from the right,
preserving any pipe characters in category names (e.g., "PL | BAJKI",
"EN | MOVIES"). This ensures the category_type is correctly extracted
as the last segment while keeping the full category name intact.

Fixes MovieFilter, SeriesFilter, and UnifiedContentViewSet category parsing.
2025-12-27 00:21:42 +01:00
SergeantPanda
0abacf1fef
Merge pull request #783 from kvnnap/dev 2025-12-26 13:51:03 -06:00
SergeantPanda
36a39cd4de Bug fix: XtreamCodes EPG limit parameter now properly converted to integer to prevent type errors when accessing EPG listings (Fixes #781) 2025-12-26 13:34:53 -06:00
Kevin Napoli
1ef5a9ca13
Fix: Continue GET request if HEAD fails with the peer closing the connection without returning a response 2025-12-26 15:27:51 +01:00
SergeantPanda
31b9868bfd Merge branch 'dev' of https://github.com/Dispatcharr/Dispatcharr into pr/sethwv/757 2025-12-24 16:04:04 -06:00
SergeantPanda
44a122924f advanced filtering for hiding disabled channels and viewing only empty channels
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
(cherry picked from commit ea38c0b4b8)
Closes #182
2025-12-23 17:37:38 -06:00
SergeantPanda
daa919c764 Refactor logging messages in StreamManager for clarity and consistency. Also removed redundant parsing. 2025-12-23 15:52:56 -06:00
SergeantPanda
ff7298a93e Enhance StreamManager for efficient log parsing and update VLC stream profile naming 2025-12-23 15:07:25 -06:00
SergeantPanda
904500906c Bug Fix: Update stream validation to return original URL instead of redirected URL when using redirect profile. 2025-12-23 09:51:02 -06:00
Seth Van Niekerk
aa5db6c3f4
Squash: Log Parsing Refactor & Enhancing 2025-12-22 15:14:46 -05:00
SergeantPanda
ee183a9f75 Bug Fix: XtreamCodes EPG has_archive field now returns integer 0 instead of string "0" for proper JSON type consistency 2025-12-19 18:39:43 -06:00
SergeantPanda
20182c7ebf
Merge branch 'main' into dev 2025-12-19 17:53:06 -06:00
SergeantPanda
5371519d8a Enhancement: Update default backup settings to enable backups and set retention count to 3 2025-12-19 10:40:56 -06:00
SergeantPanda
de31826137 refactor: externalize Redis and Celery configuration via environment variables
Replace hardcoded localhost:6379 values throughout codebase with environment-based configuration. Add REDIS_PORT support and allow REDIS_URL override for external Redis services. Configure Celery broker/result backend to use Redis settings with environment variable overrides.

Closes #762
2025-12-18 16:54:59 -06:00
SergeantPanda
e78c18c473 Bug Fix: XC get_simple_data_table now returns the id of the program in the database and epg_id the epg id from the matched epg. 2025-12-18 16:11:26 -06:00
SergeantPanda
73956924f5 Enhancement: Stream group as available hash option: Users can now select 'Group' as a hash key option in Settings → Stream Settings → M3U Hash Key, allowing streams to be differentiated by their group membership in addition to name, URL, TVG-ID, and M3U ID 2025-12-18 15:26:08 -06:00
SergeantPanda
2558ea0b0b Enhancement: Add VOD client stop functionality to Stats page 2025-12-17 16:54:10 -06:00
Dispatcharr
865ba432d3 Updated url path
#697 Encode tvg_id for DVR series rule deletions
2025-12-16 23:06:49 -06:00
SergeantPanda
98a016a418 Enhance series info retrieval to return unique episodes and improve relation handling for active M3U accounts 2025-12-16 15:54:33 -06:00
SergeantPanda
748d5dc72d Bug Fix: When multiple m3uepisoderelations for a requested episode existed, the xc api would fail.(Fixes #569) 2025-12-16 15:44:42 -06:00
SergeantPanda
48e7060cdb Bug Fix: VOD episode processing now correctly handles duplicate episodes from the same provider. (Fixes #556) 2025-12-16 15:24:16 -06:00
Seth Van Niekerk
bc72b2d4a3
Add VLC and streamlink codec parsing support 2025-12-15 20:09:54 -05:00
Seth Van Niekerk
88c10e85c3
Add VLC TS demux output detection for codec parsing 2025-12-15 20:09:54 -05:00
SergeantPanda
41642cd479 Improve orphaned CrontabSchedule cleanup logic to avoid deleting in-use schedules 2025-12-15 16:54:12 -06:00
SergeantPanda
4878e92f44
Merge pull request #488 from stlalpha/feature/automated-backups
Enhancement: Add automated configuration backups
2025-12-15 16:17:33 -06:00
Jim McBride
bd6cf287dc
Clean up orphaned CrontabSchedule records
- Add _cleanup_orphaned_crontab() helper function
  - Delete old crontab when disabling backup schedule
  - Delete old crontab when schedule settings change
  - Prevents database bloat from unused CrontabSchedule records
2025-12-13 19:02:36 -06:00
Jim McBride
662c5ff89a Reorganize simple mode backup scheduler layout
- Row 1: Frequency, Day (if weekly), Hour, Minute, Period (if 12h)
- Row 2: Retention, Save button
- Use wrap=nowrap to keep time selectors on same row
2025-12-13 18:49:36 -06:00