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:
parent
396a826d98
commit
87f7c8f74d
@ -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,
|
||||
|
||||
@ -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"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user