Commit graph

93 commits

Author SHA1 Message Date
SergeantPanda
92d499a274 Enhancement: Switch regex compilation from re to regex module
Use the 'regex' package instead of Python's standard 're' module for pattern
compilation in custom dummy EPG generation. This enables variable-width
lookbehind support, matching JavaScript regex behavior and removing the
fixed-width limitation of the standard library.

This fixes issues where patterns like (?<=\d{1,2}...) would fail with
"look-behind requires fixed-width pattern" errors.
2025-10-19 19:39:53 -05:00
SergeantPanda
4b74673795 Bug fix: Use search instead of match for checking if the title matches the title_match regex for custom dummy. 2025-10-19 17:06:44 -05:00
SergeantPanda
6a85475402 Enhancement: Adds ability to specify categories (comma separted) as well as include date and live tags in custom epg dummy output. 2025-10-19 10:06:48 -05:00
SergeantPanda
163b1dd7cf Move buttons to the right side and correctly load in output timezone for custom dummy epg. 2025-10-18 21:19:54 -05:00
SergeantPanda
603c9f9269 Enhancement: Added ability to specify output timezone for custom epg dummy. 2025-10-18 21:12:20 -05:00
SergeantPanda
fe540045fc Enhancement: Add a {time} and {time24} output for better output formatting of the time. 2025-10-18 21:06:27 -05:00
SergeantPanda
dee672287b Bug fix: Fixes bug where if minute was not specified matching would fail for custom dummy. 2025-10-18 20:50:56 -05:00
SergeantPanda
c21ea5ecbe Bug Fix: Use event timezone for date calculation in custom dummy channels
Previously used UTC date which caused events to be scheduled a day late when current UTC time had crossed midnight but the event timezone hadn't.
2025-10-18 20:46:06 -05:00
SergeantPanda
8494f615d0 Bug fix: Use correct name if stream name is supposed to be used to build dummy. 2025-10-18 17:29:44 -05:00
SergeantPanda
22fb0b3bdd Enhancement: Add Custom Dummy EPG with Dynamic Pattern Matching and Name Source Selection
This enhancement introduces a powerful custom dummy EPG system that allows users to generate EPG programs on-demand by parsing channel or stream names using configurable regex patterns.

Key Features:
- Custom Pattern Matching: Define regex patterns to extract information from channel/stream names (teams, leagues, times, dates, etc.)
- Flexible Name Source: Choose to parse either the channel name or a specific stream name (by index)
- Timezone-Aware Scheduling: Automatic DST handling using pytz timezone names (e.g., 'US/Eastern', 'Europe/London')
- Time Format Support: Parse both 12-hour (AM/PM) and 24-hour time formats
- Date Parsing: Extract dates from names with flexible month/day/year patterns
- Custom Templates: Format EPG titles and descriptions using captured groups with {placeholder} syntax
- Upcoming/Ended Customization: Define custom titles and descriptions for programs before and after scheduled events
- Live Preview: Test patterns and templates in real-time with sample input
- Smart Program Generation: Automatically creates "Upcoming" and "Ended" programs around scheduled events

Use Cases:
- Sports channels with event details in stream names (e.g., "NHL 01: Bruins VS Leafs @ 8:00PM ET")
- Movie channels with genre/title/year information
- Racing events with driver/track/series details
- Any scenario where EPG data is embedded in channel/stream naming conventions

Technical Implementation:
- Backend: Pattern matching engine with timezone conversion and program scheduling logic
- Frontend: Interactive form with validation, pattern testing, and visual group preview
- Name Source Options: Parse from channel name or selectable stream index (1-based)
- Fallback Behavior: Uses standard dummy EPG if patterns don't match
- Custom Properties: Stores all configuration in EPGSource.custom_properties JSON field

Configuration Options:
- Title Pattern: Extract primary information (required)
- Time Pattern: Extract hour/minute/AM-PM (optional)
- Date Pattern: Extract month/day/year (optional)
- Timezone: Event timezone with automatic DST support
- Program Duration: Length of generated programs in minutes
- Title Template: Format EPG title using captured groups
- Description Template: Format EPG description using captured groups
- Upcoming Title Template: Custom title for programs before event starts (optional)
- Upcoming Description Template: Custom description for programs before event starts (optional)
- Ended Title Template: Custom title for programs after event ends (optional)
- Ended Description Template: Custom description for programs after event ends (optional)
- Name Source: Channel name or stream name
- Stream Index: Which stream to use when parsing stream names (1, 2, 3, etc.)

Closes #293
2025-10-18 12:08:56 -05:00
SergeantPanda
d5f9ba7e5e Sort EPG output by channel number. 2025-10-10 17:55:51 -05:00
SergeantPanda
f58bc81c36 Enhancement: Optimize EPG program fetching by implementing chunked retrieval and explicit ordering to improve performance and reduce memory issues. 2025-10-10 17:52:05 -05:00
SergeantPanda
144a861142 Bug fix: When using direct urls in m3u output, use the correct stream based on the order for the channel.
Fixes #528
2025-10-06 18:18:05 -05:00
SergeantPanda
e01338f055 Enhancement: Properly track channel creation time and channel update times in the database. XC Get Live streams will now use this for the added field. 2025-10-06 18:07:51 -05:00
SergeantPanda
a4a677a6fb Bug fix: Streamers with ALL assigned will now get all channels they have access to instead of All profiles. If there wasn't a profile other than default before, the streamer would not get any channels. 2025-10-06 16:50:17 -05:00
SergeantPanda
a31feee311 Bug fix: Ensure distinct channel results in generate_m3u, generate_epg, and xc_get_live_streams functions. Fixes duplicate channels output for streamer profiles that were set to "All" 2025-10-05 19:32:40 -05:00
SergeantPanda
93dd37e822 Enhancement: Add x-tg-url and url-tvg URL generation with preserved query parameters to M3U content 2025-09-26 14:10:42 -05:00
SergeantPanda
48a2f2da39 Simplify VOD and series access for all authenticated users by removing user-level restrictions on M3U accounts. 2025-09-18 11:17:49 -05:00
SergeantPanda
eccc5d709a Sort categories by name during api retrieval. 2025-09-15 20:38:18 -05:00
SergeantPanda
fbeca53cd7 Minor fixes to VOD api. trailer returned Null instead of empty string, removed decimal from added time. 2025-09-04 13:44:15 -05:00
SergeantPanda
eff4b665b1 Fix bug where multiple relations would error out get_vod_info 2025-09-02 15:52:40 -05:00
SergeantPanda
ffe6ce5a6b Removed unnecessary fall backs for trailer. 2025-09-02 15:35:04 -05:00
SergeantPanda
ac5df3fd28 Optimize VOD streams retrieval by using prefetch_related to eliminate N+1 queries 2025-09-02 14:59:33 -05:00
SergeantPanda
6f6c28ca7c Convert custom_properties to jsonb in the backend. 2025-09-02 09:41:51 -05:00
SergeantPanda
3a81227a73 Move tuner calculation to central location and use it to dynamically calculate tuner counts for XC api user_info 2025-08-28 15:26:51 -05:00
SergeantPanda
62c4e1625b Dynamically calculate expiration date 90 days out instead of hardcoded. 2025-08-28 15:12:13 -05:00
SergeantPanda
24f876d09f Add priority for providers so VOD's can be auto selected based on the priority. 2025-08-20 17:38:21 -05:00
SergeantPanda
920201312e Fix episodes api call for series endpoint. 2025-08-11 16:07:41 -05:00
SergeantPanda
d4a93b8e4b Populate seasons array. 2025-08-10 21:56:39 -05:00
SergeantPanda
46a5b3355a Lots of fixes for series xc api responses. 2025-08-10 21:30:05 -05:00
SergeantPanda
4d7987214b Fixed some vod apis, converted duration to duration_secs, add custom_poperties to vod_episode 2025-08-09 16:31:33 -05:00
SergeantPanda
3ac84e530a Switch to smarter extraction of port and if fails, take a guess. 2025-08-09 13:55:49 -05:00
SergeantPanda
b90956c49f Couple fixes for vod api. 2025-08-08 13:18:20 -05:00
SergeantPanda
19e59ae178 Switch to movie and episode id instead of relations. 2025-08-08 12:48:02 -05:00
SergeantPanda
4a80cb6d5c Fix get_vod_info 2025-08-08 11:34:27 -05:00
SergeantPanda
d054e2cac5 Add XC endpoints for VOD. 2025-08-08 09:03:25 -05:00
SergeantPanda
a332678cfb Remove URL from episode relation table. 2025-08-08 08:06:28 -05:00
SergeantPanda
0e388968c4 Convert to relation tables to support multiple providers for each vod. 2025-08-07 12:31:05 -05:00
SergeantPanda
0585fc1dfe Separate Movies, Series and Episodes into their own tables 2025-08-02 13:32:44 -05:00
SergeantPanda
84aa631196 Initial backend commit for vod 2025-08-02 10:42:36 -05:00
SergeantPanda
e029cd8b3d Fix XML escaping for channel ID in generate_dummy_epg function 2025-07-31 10:22:43 -05:00
SergeantPanda
5148a5a79b Use channel name for display name in EPG output. 2025-07-20 20:01:51 -05:00
SergeantPanda
d24520d3d8 Enhance EPG XML generation with additional metadata extraction and improved handling for keywords, languages, ratings, and credits. 2025-07-10 13:22:42 -05:00
SergeantPanda
f2a238915a Use streaming response during EPG generation to avoid clients timing out.
Closes #179
2025-06-27 14:54:47 -05:00
SergeantPanda
42747e743c Converted epg_channel_id to a string as well. 2025-06-16 18:05:04 -05:00
SergeantPanda
db7ca1a0c8 Convert "category_id" to string (but not category_ids" 2025-06-15 18:21:41 -05:00
SergeantPanda
85a639ec5f Order XC live streams output by channel number. 2025-06-15 17:45:47 -05:00
dekzter
e2e8b7088a Fixed bad merge conflict 2025-06-11 08:23:51 -04:00
dekzter
a1576bd493 merged in dev 2025-06-10 08:55:14 -04:00
SergeantPanda
8ae314fbb0 Merge branch 'dev' of https://github.com/Dispatcharr/Dispatcharr into dev 2025-06-06 19:05:35 -05:00