test
This commit is contained in:
parent
0c00aa2da1
commit
4de206f6ff
@ -20,7 +20,16 @@ class OriginEPG():
|
|||||||
epg_opn = self.fhdhr.web.session.get(self.base_epg_url + str(chan_obj.dict["origin_id"]))
|
epg_opn = self.fhdhr.web.session.get(self.base_epg_url + str(chan_obj.dict["origin_id"]))
|
||||||
epg_json = epg_opn.json()
|
epg_json = epg_opn.json()
|
||||||
|
|
||||||
for listing in epg_json["channel"][0]["programme"]:
|
current_channel_id = chan_obj.dict["origin_id"]
|
||||||
|
|
||||||
|
for listing in epg_json["programme"]:
|
||||||
|
|
||||||
|
if listing["channel"] != current_channel_id:
|
||||||
|
listing_chan_obj = fhdhr_channels.get_channel_obj("origin_id", listing["channel"])
|
||||||
|
if str(listing_chan_obj.number) not in list(programguide.keys()):
|
||||||
|
programguide[str(listing_chan_obj.number)] = listing_chan_obj.epgdict
|
||||||
|
else:
|
||||||
|
listing_chan_obj = chan_obj
|
||||||
|
|
||||||
timestampdict = self.stirr_time_convert(listing["start"], listing["stop"])
|
timestampdict = self.stirr_time_convert(listing["start"], listing["stop"])
|
||||||
|
|
||||||
@ -42,8 +51,8 @@ class OriginEPG():
|
|||||||
"thumbnail": None
|
"thumbnail": None
|
||||||
}
|
}
|
||||||
|
|
||||||
if not any((d['time_start'] == clean_prog_dict['time_start'] and d['id'] == clean_prog_dict['id']) for d in programguide[chan_obj.number]["listing"]):
|
if not any((d['time_start'] == clean_prog_dict['time_start'] and d['id'] == clean_prog_dict['id']) for d in programguide[listing_chan_obj.number]["listing"]):
|
||||||
programguide[str(chan_obj.number)]["listing"].append(clean_prog_dict)
|
programguide[str(listing_chan_obj.number)]["listing"].append(clean_prog_dict)
|
||||||
|
|
||||||
return programguide
|
return programguide
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user