fHDHR_IPTVorg-US/origin/origin_epg.py
deathbybandaid 8b2e6bcffb test
2020-12-09 12:26:13 -05:00

23 lines
704 B
Python

class OriginEPG():
def __init__(self, fhdhr):
self.fhdhr = fhdhr
def update_epg(self, fhdhr_channels):
programguide = {}
for fhdhr_id in list(fhdhr_channels.list.keys()):
chan_obj = fhdhr_channels.list[fhdhr_id]
filtered_chan_dict = fhdhr_channels.origin.get_channel_dict(fhdhr_channels.origin.filtered_chan_list, "name", chan_obj.dict["origin_name"])
if str(chan_obj.dict["number"]) not in list(programguide.keys()):
programguide[str(chan_obj.dict["number"])] = chan_obj.epgdict
# if filtered_chan_dict["tvg"]["url"]:
print(filtered_chan_dict["tvg"]["url"])
return programguide