mirror of
https://github.com/fHDHR/fHDHR_NextPVR.git
synced 2025-12-06 17:46:58 -05:00
EPG/XMLTV Tweaks
This commit is contained in:
parent
bfdbeded3a
commit
eb55403bee
@ -28,15 +28,16 @@ class EPG():
|
||||
if method == "get":
|
||||
|
||||
epgdict = self.fhdhr.device.epg.get_epg(source)
|
||||
epgdict = epgdict.copy()
|
||||
for c in list(epgdict.keys()):
|
||||
chan_obj = self.fhdhr.device.channels.get_channel_obj("origin_id", epgdict[c]["id"])
|
||||
epgdict[chan_obj.dict["number"]] = epgdict.pop(c)
|
||||
epgdict[chan_obj.dict["number"]]["name"] = chan_obj.dict["name"]
|
||||
epgdict[chan_obj.dict["number"]]["callsign"] = chan_obj.dict["callsign"]
|
||||
epgdict[chan_obj.dict["number"]]["number"] = chan_obj.dict["number"]
|
||||
epgdict[chan_obj.dict["number"]]["id"] = chan_obj.dict["origin_id"]
|
||||
epgdict[chan_obj.dict["number"]]["thumbnail"] = chan_obj.thumbnail
|
||||
if source in ["blocks", "origin", self.fhdhr.config.dict["main"]["dictpopname"]]:
|
||||
epgdict = epgdict.copy()
|
||||
for c in list(epgdict.keys()):
|
||||
chan_obj = self.fhdhr.device.channels.get_channel_obj("origin_id", epgdict[c]["id"])
|
||||
epgdict[chan_obj.dict["number"]] = epgdict.pop(c)
|
||||
epgdict[chan_obj.dict["number"]]["name"] = chan_obj.dict["name"]
|
||||
epgdict[chan_obj.dict["number"]]["callsign"] = chan_obj.dict["callsign"]
|
||||
epgdict[chan_obj.dict["number"]]["number"] = chan_obj.dict["number"]
|
||||
epgdict[chan_obj.dict["number"]]["id"] = chan_obj.dict["origin_id"]
|
||||
epgdict[chan_obj.dict["number"]]["thumbnail"] = chan_obj.thumbnail
|
||||
|
||||
epg_json = json.dumps(epgdict, indent=4)
|
||||
|
||||
|
||||
@ -38,6 +38,18 @@ class xmlTV():
|
||||
if method == "get":
|
||||
|
||||
epgdict = self.fhdhr.device.epg.get_epg(source)
|
||||
|
||||
if source in ["blocks", "origin", self.fhdhr.config.dict["main"]["dictpopname"]]:
|
||||
epgdict = epgdict.copy()
|
||||
for c in list(epgdict.keys()):
|
||||
chan_obj = self.fhdhr.device.channels.get_channel_obj("origin_id", epgdict[c]["id"])
|
||||
epgdict[chan_obj.dict["number"]] = epgdict.pop(c)
|
||||
epgdict[chan_obj.dict["number"]]["name"] = chan_obj.dict["name"]
|
||||
epgdict[chan_obj.dict["number"]]["callsign"] = chan_obj.dict["callsign"]
|
||||
epgdict[chan_obj.dict["number"]]["number"] = chan_obj.dict["number"]
|
||||
epgdict[chan_obj.dict["number"]]["id"] = chan_obj.dict["origin_id"]
|
||||
epgdict[chan_obj.dict["number"]]["thumbnail"] = chan_obj.thumbnail
|
||||
|
||||
xmltv_xml = self.create_xmltv(base_url, epgdict, source)
|
||||
|
||||
return Response(status=200,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user