1
0
mirror of https://github.com/fHDHR/fHDHR_NextPVR.git synced 2025-12-06 12:56:57 -05:00

Bugfix and More Enhancements

This commit is contained in:
deathbybandaid 2020-12-07 16:36:00 -05:00
parent 396a826d98
commit 87f7c8f74d
2 changed files with 12 additions and 2 deletions

View File

@ -28,6 +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
epg_json = json.dumps(epgdict, indent=4)
return Response(status=200,

View File

@ -81,13 +81,13 @@ class xmlTV():
def create_xmltv(self, base_url, epgdict, source):
if not epgdict:
return self.xmltv_empty()
epgdict.copy()
epgdict = epgdict.copy()
out = self.xmltv_headers()
if source in ["origin", "blocks", self.fhdhr.config.dict["main"]["dictpopname"]]:
for c in list(epgdict.keys()):
chan_obj = self.fhdhr.channels.get_channel_obj("origin_id", c["id"])
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"]