mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 09:06:06 +00:00
feat(epg): add force option back to parse_programs_for_tvg_id function
This commit is contained in:
parent
87b8035e06
commit
e25d470565
1 changed files with 2 additions and 2 deletions
|
|
@ -1427,7 +1427,7 @@ def parse_channels_only(source):
|
|||
|
||||
|
||||
@shared_task(time_limit=3600, soft_time_limit=3500)
|
||||
def parse_programs_for_tvg_id(epg_id):
|
||||
def parse_programs_for_tvg_id(epg_id, force=False):
|
||||
# Skip XMLTV file parsing for Schedules Direct sources. Program data is
|
||||
# fetched and persisted directly by fetch_schedules_direct().
|
||||
try:
|
||||
|
|
@ -1479,7 +1479,7 @@ def parse_programs_for_tvg_id(epg_id):
|
|||
release_task_lock('parse_epg_programs', epg_id)
|
||||
return
|
||||
|
||||
if not Channel.objects.filter(epg_data=epg).exists():
|
||||
if not force and not Channel.objects.filter(epg_data=epg).exists():
|
||||
logger.info(f"No channels matched to EPG {epg.tvg_id}")
|
||||
lock_renewer.stop()
|
||||
release_task_lock('parse_epg_programs', epg_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue