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

Update EPG Directory Structure

This commit is contained in:
deathbybandaid 2020-12-09 16:26:43 -05:00
parent 01c7b7fd99
commit 8b870430ad
6 changed files with 12 additions and 3 deletions

View File

@ -53,7 +53,13 @@ class Config():
for dir_type in ["alternative_epg", "origin"]:
for file_item in os.listdir(self.internal["paths"][dir_type]):
file_item_path = os.path.join(self.internal["paths"][dir_type], file_item)
file_item_path = pathlib.Path(self.internal["paths"][dir_type]).joinpath(file_item)
if file_item_path.is_dir():
for sub_file_item in os.listdir(file_item_path):
sub_file_item_path = pathlib.Path(file_item_path).joinpath(sub_file_item)
if str(sub_file_item_path).endswith("_conf.json"):
self.read_json_config(sub_file_item_path)
else:
if str(file_item_path).endswith("_conf.json"):
self.read_json_config(file_item_path)

View File

@ -140,6 +140,9 @@ class EPG():
if entry.is_file():
if entry.name[0] != '_' and entry.name.endswith(".py"):
new_epgtype_list.append(str(entry.name[:-3]))
elif entry.is_dir():
if entry.name[0] != '_':
new_epgtype_list.append(str(entry.name))
for method in new_epgtype_list:
self.fhdhr.logger.info("Found %s EPG method." % method)
self.epg_handling[method] = eval("self.alternative_epg.%s.%sEPG(self.fhdhr, self.channels)" % (method, method))