mirror of
https://github.com/fHDHR/fHDHR_NextPVR.git
synced 2025-12-06 21:16:58 -05:00
Update EPG Directory Structure
This commit is contained in:
parent
01c7b7fd99
commit
8b870430ad
@ -53,7 +53,13 @@ class Config():
|
|||||||
for dir_type in ["alternative_epg", "origin"]:
|
for dir_type in ["alternative_epg", "origin"]:
|
||||||
|
|
||||||
for file_item in os.listdir(self.internal["paths"][dir_type]):
|
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"):
|
if str(file_item_path).endswith("_conf.json"):
|
||||||
self.read_json_config(file_item_path)
|
self.read_json_config(file_item_path)
|
||||||
|
|
||||||
|
|||||||
@ -140,6 +140,9 @@ class EPG():
|
|||||||
if entry.is_file():
|
if entry.is_file():
|
||||||
if entry.name[0] != '_' and entry.name.endswith(".py"):
|
if entry.name[0] != '_' and entry.name.endswith(".py"):
|
||||||
new_epgtype_list.append(str(entry.name[:-3]))
|
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:
|
for method in new_epgtype_list:
|
||||||
self.fhdhr.logger.info("Found %s EPG method." % method)
|
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))
|
self.epg_handling[method] = eval("self.alternative_epg.%s.%sEPG(self.fhdhr, self.channels)" % (method, method))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user