fHDHR_IPTVorg-US/origin/origin_epg.py
deathbybandaid 8a798bcc05 test
2020-12-09 08:13:42 -05:00

22 lines
561 B
Python

import datetime
class OriginEPG():
def __init__(self, fhdhr):
self.fhdhr = fhdhr
def update_epg(self, fhdhr_channels):
programguide = {}
todaydate = datetime.datetime.utcnow().date()
self.remove_stale_cache(todaydate)
for fhdhr_id in list(fhdhr_channels.list.keys()):
chan_obj = fhdhr_channels.list[fhdhr_id]
if str(chan_obj.dict["number"]) not in list(programguide.keys()):
programguide[str(chan_obj.dict["number"])] = chan_obj.epgdict
return programguide