Dispatcharr/apps/epg/migrations
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
..
0001_initial.py modified database fields for consistency, removed custom_url from streams (no longer needed) 2025-03-16 09:07:10 -04:00
0002_epgsource_file_path.py EPG Processing 2025-03-19 12:49:38 -05:00
0003_alter_epgdata_tvg_id.py epg refactor, new relations and matching 2025-03-26 13:28:03 -04:00
0004_epgdata_epg_source_alter_epgdata_tvg_id.py epg refactor, new relations and matching 2025-03-26 13:28:03 -04:00
0005_programdata_custom_properties_and_more.py new custom properties fields for m3u and program data 2025-03-27 13:02:19 -04:00
0006_epgsource_refresh_interval_epgsource_refresh_task.py django beat, refresh intervals for epg and m3u 2025-03-30 11:53:26 -04:00
0007_epgsource_status_epgsource_last_error.py Status update overhaul for epg files. 2025-05-03 18:39:59 -05:00
0007_populate_periodic_tasks.py django beat, refresh intervals for epg and m3u 2025-03-30 11:53:26 -04:00
0008_epgsource_created_at_epgsource_updated_at.py updated timestamp and extension checks for m3 uand epg 2025-04-07 12:46:45 -04:00
0009_alter_epgsource_created_at_and_more.py updated timestamp and extension checks for m3 uand epg 2025-04-07 12:46:45 -04:00
0010_merge_20250503_2147.py Status update overhaul for epg files. 2025-05-03 18:39:59 -05:00
0011_update_epgsource_fields.py Convert m3u accounts to a similar format to epg for status updates. Renamed DB field last_error to last_message so we can use it for more messaging. Migration to change updated_at field to not be updated everytime the m3u changes. It should only update the updated_at when we successfully update the m3u. 2025-05-04 17:51:57 -05:00
0012_alter_epgsource_status.py Created missing migrations. 2025-05-14 20:10:26 -05:00
0013_alter_epgsource_refresh_interval.py Set default refresh interval for files added via mapping to 0 since they will auto-update when modified. 2025-05-21 14:59:24 -05:00
0014_epgsource_extracted_file_path.py Add extracted_file_path to EPGSource model and update extraction logic 2025-05-26 15:10:54 -05:00
0015_alter_programdata_custom_properties.py Convert custom_properties to jsonb in the backend. 2025-09-02 09:41:51 -05:00
0016_epgdata_icon_url.py Switch bulk epg name and logo to backend celery tasks for efficiency and scrape epg channel logo during epg scanning. 2025-09-16 17:17:07 -05:00
0017_alter_epgsource_url.py Enhancement: Increase max_length of URL field in EPGSource model to 1000 characters 2025-09-24 16:12:17 -05:00
0018_epgsource_custom_properties_and_more.py Enhancement: Add Custom Dummy EPG with Dynamic Pattern Matching and Name Source Selection 2025-10-18 12:08:56 -05:00
__init__.py Initial commit 2025-02-18 11:14:09 -06:00