From ab7b92bcbdde6a9c4a6b82c6f8625ed9cb81edc2 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Fri, 11 Apr 2025 16:00:11 -0500 Subject: [PATCH] Fix: Access the first element directly for EPG ID assignment in process_data --- scripts/epg_match.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/epg_match.py b/scripts/epg_match.py index deece784..e5d17466 100644 --- a/scripts/epg_match.py +++ b/scripts/epg_match.py @@ -52,7 +52,8 @@ def process_data(input_data): if chan["tvg_id"]: epg_match = [epg["id"] for epg in epg_data if epg["tvg_id"] == chan["tvg_id"]] if epg_match: - chan["epg_data_id"] = epg_match[0]["id"] + # Fix: Access the first element directly since epg_match contains the IDs themselves + chan["epg_data_id"] = epg_match[0] # Directly use the integer ID eprint(f"Channel {chan['id']} '{chan['name']}' => EPG found by tvg_id={chan['tvg_id']}") channels_to_update.append(chan) continue