mirror of
https://github.com/fHDHR/fHDHR_NextPVR.git
synced 2025-12-06 10:16:58 -05:00
commit
eeb13ea977
@ -85,6 +85,9 @@ class EmptyEPG():
|
|||||||
|
|
||||||
programguide[str(c["number"])]["listing"].append(clean_prog_dict)
|
programguide[str(c["number"])]["listing"].append(clean_prog_dict)
|
||||||
|
|
||||||
|
for cnum in programguide:
|
||||||
|
programguide[cnum]["listing"] = sorted(programguide[cnum]["listing"], key=lambda i: i['time_start'])
|
||||||
|
|
||||||
self.epg_cache = programguide
|
self.epg_cache = programguide
|
||||||
with open(self.epg_cache_file, 'w') as epgfile:
|
with open(self.epg_cache_file, 'w') as epgfile:
|
||||||
epgfile.write(json.dumps(programguide, indent=4))
|
epgfile.write(json.dumps(programguide, indent=4))
|
||||||
|
|||||||
@ -117,6 +117,8 @@ class ZapEPG():
|
|||||||
zap_time_window = int(self.config["zap2it"]["timespan"]) * 3600
|
zap_time_window = int(self.config["zap2it"]["timespan"]) * 3600
|
||||||
zap_time = int(zap_time - (zap_time % zap_time_window))
|
zap_time = int(zap_time - (zap_time % zap_time_window))
|
||||||
|
|
||||||
|
self.remove_stale_cache(zap_time)
|
||||||
|
|
||||||
# Fetch data in `zap_timespan` chunks.
|
# Fetch data in `zap_timespan` chunks.
|
||||||
for i in range(int(7 * 24 / int(self.config["zap2it"]["timespan"]))):
|
for i in range(int(7 * 24 / int(self.config["zap2it"]["timespan"]))):
|
||||||
i_time = zap_time + (i * zap_time_window)
|
i_time = zap_time + (i * zap_time_window)
|
||||||
@ -196,6 +198,9 @@ class ZapEPG():
|
|||||||
|
|
||||||
programguide[str(cdict["channelNo"])]["listing"].append(clean_prog_dict)
|
programguide[str(cdict["channelNo"])]["listing"].append(clean_prog_dict)
|
||||||
|
|
||||||
|
for cnum in programguide:
|
||||||
|
programguide[cnum]["listing"] = sorted(programguide[cnum]["listing"], key=lambda i: i['time_start'])
|
||||||
|
|
||||||
self.epg_cache = programguide
|
self.epg_cache = programguide
|
||||||
with open(self.epg_cache_file, 'w') as epgfile:
|
with open(self.epg_cache_file, 'w') as epgfile:
|
||||||
epgfile.write(json.dumps(programguide, indent=4))
|
epgfile.write(json.dumps(programguide, indent=4))
|
||||||
|
|||||||
@ -294,6 +294,9 @@ class proxyserviceFetcher():
|
|||||||
|
|
||||||
programguide[str(cdict["number"])]["listing"].append(clean_prog_dict)
|
programguide[str(cdict["number"])]["listing"].append(clean_prog_dict)
|
||||||
|
|
||||||
|
for cnum in programguide:
|
||||||
|
programguide[cnum]["listing"] = sorted(programguide[cnum]["listing"], key=lambda i: i['time_start'])
|
||||||
|
|
||||||
self.epg_cache = programguide
|
self.epg_cache = programguide
|
||||||
with open(self.epg_cache_file, 'w') as epgfile:
|
with open(self.epg_cache_file, 'w') as epgfile:
|
||||||
epgfile.write(json.dumps(programguide, indent=4))
|
epgfile.write(json.dumps(programguide, indent=4))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user