mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 17:16:26 +00:00
fix(epg): address third round of reviewer feedback
This commit is contained in:
parent
4d5ffaf223
commit
ca6ab0cd02
2 changed files with 4 additions and 3 deletions
|
|
@ -37,6 +37,7 @@ class EPGSourceSerializer(serializers.ModelSerializer):
|
|||
'epg_data_count',
|
||||
'has_channels',
|
||||
]
|
||||
extra_kwargs = {'password': {'write_only': True}}
|
||||
|
||||
def get_epg_data_count(self, obj):
|
||||
"""Return the count of EPG data entries instead of all IDs to prevent large payloads"""
|
||||
|
|
|
|||
|
|
@ -2540,17 +2540,17 @@ def fetch_schedules_direct(source, stations_only=False):
|
|||
}
|
||||
|
||||
# Only fetch programs where MD5 differs from our cached value
|
||||
programs_to_fetch = [
|
||||
programs_to_fetch = {
|
||||
pid for pid in program_ids_needed
|
||||
if schedule_program_md5s.get(pid) != cached_prog_md5s.get(pid)
|
||||
]
|
||||
}
|
||||
|
||||
logger.info(
|
||||
f"Program MD5 delta: {len(program_ids_needed)} programs in schedules, "
|
||||
f"{len(programs_to_fetch)} need downloading ({len(program_ids_needed) - len(programs_to_fetch)} unchanged).")
|
||||
|
||||
program_metadata = {}
|
||||
program_id_list = programs_to_fetch
|
||||
program_id_list = list(programs_to_fetch)
|
||||
total_batches = max(1, (len(program_id_list) + SD_PROGRAM_BATCH_SIZE - 1) // SD_PROGRAM_BATCH_SIZE)
|
||||
|
||||
if program_id_list:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue