mirror of
https://github.com/fHDHR/fHDHR_NextPVR.git
synced 2025-12-06 14:06:59 -05:00
Compare commits
No commits in common. "22955ce11f9be3d52a397b7f68194aa7b0d45c76" and "c9b20743fde2d4e047ba80e806750d021805b7f2" have entirely different histories.
22955ce11f
...
c9b20743fd
7
alternative_epg/__init__.py
Normal file
7
alternative_epg/__init__.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
alt_epg_top_dir = os.path.dirname(__file__)
|
||||||
|
for entry in os.scandir(alt_epg_top_dir):
|
||||||
|
if entry.is_dir() and not entry.is_file() and entry.name[0] != '_':
|
||||||
|
imp_string = "from .%s import *" % entry.name
|
||||||
|
exec(imp_string)
|
||||||
@ -2,10 +2,6 @@ import datetime
|
|||||||
|
|
||||||
from fHDHR.exceptions import EPGSetupError
|
from fHDHR.exceptions import EPGSetupError
|
||||||
|
|
||||||
PLUGIN_NAME = "tvtv"
|
|
||||||
PLUGIN_VERSION = "v0.6.0-beta"
|
|
||||||
PLUGIN_TYPE = "alt_epg"
|
|
||||||
|
|
||||||
|
|
||||||
class tvtvEPG():
|
class tvtvEPG():
|
||||||
|
|
||||||
@ -4,10 +4,6 @@ import urllib.parse
|
|||||||
from fHDHR.tools import xmldictmaker
|
from fHDHR.tools import xmldictmaker
|
||||||
from fHDHR.exceptions import EPGSetupError
|
from fHDHR.exceptions import EPGSetupError
|
||||||
|
|
||||||
PLUGIN_NAME = "zap2it"
|
|
||||||
PLUGIN_VERSION = "v0.6.0-beta"
|
|
||||||
PLUGIN_TYPE = "alt_epg"
|
|
||||||
|
|
||||||
|
|
||||||
class zap2itEPG():
|
class zap2itEPG():
|
||||||
|
|
||||||
@ -15,6 +15,11 @@
|
|||||||
"config_file": true,
|
"config_file": true,
|
||||||
"config_web": true
|
"config_web": true
|
||||||
},
|
},
|
||||||
|
"valid_epg_methods":{
|
||||||
|
"value": "None,blocks",
|
||||||
|
"config_file": false,
|
||||||
|
"config_web": false
|
||||||
|
},
|
||||||
"reverse_days": {
|
"reverse_days": {
|
||||||
"value": -1,
|
"value": -1,
|
||||||
"config_file": true,
|
"config_file": true,
|
||||||
|
|||||||
@ -26,12 +26,12 @@ class fHDHR_INT_OBJ():
|
|||||||
|
|
||||||
class fHDHR_OBJ():
|
class fHDHR_OBJ():
|
||||||
|
|
||||||
def __init__(self, settings, logger, db, plugins):
|
def __init__(self, settings, logger, db, origin, alternative_epg):
|
||||||
self.fhdhr = fHDHR_INT_OBJ(settings, logger, db)
|
self.fhdhr = fHDHR_INT_OBJ(settings, logger, db)
|
||||||
|
|
||||||
self.originwrapper = OriginServiceWrapper(self.fhdhr, plugins.origin)
|
self.originwrapper = OriginServiceWrapper(self.fhdhr, origin)
|
||||||
|
|
||||||
self.device = fHDHR_Device(self.fhdhr, self.originwrapper, plugins)
|
self.device = fHDHR_Device(self.fhdhr, self.originwrapper, alternative_epg)
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
''' will only get called for undefined attributes '''
|
''' will only get called for undefined attributes '''
|
||||||
|
|||||||
@ -25,15 +25,15 @@ def build_args_parser():
|
|||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
def get_configuration(args, script_dir, plugins, fHDHR_web):
|
def get_configuration(args, script_dir, origin, fHDHR_web):
|
||||||
if not os.path.isfile(args.cfg):
|
if not os.path.isfile(args.cfg):
|
||||||
raise fHDHR.exceptions.ConfigurationNotFound(filename=args.cfg)
|
raise fHDHR.exceptions.ConfigurationNotFound(filename=args.cfg)
|
||||||
return fHDHR.config.Config(args.cfg, script_dir, plugins, fHDHR_web)
|
return fHDHR.config.Config(args.cfg, script_dir, origin, fHDHR_web)
|
||||||
|
|
||||||
|
|
||||||
def run(settings, logger, db, script_dir, fHDHR_web, plugins):
|
def run(settings, logger, db, script_dir, fHDHR_web, origin, alternative_epg):
|
||||||
|
|
||||||
fhdhr = fHDHR_OBJ(settings, logger, db, plugins)
|
fhdhr = fHDHR_OBJ(settings, logger, db, origin, alternative_epg)
|
||||||
fhdhrweb = fHDHR_web.fHDHR_HTTP_Server(fhdhr)
|
fhdhrweb = fHDHR_web.fHDHR_HTTP_Server(fhdhr)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -64,11 +64,11 @@ def run(settings, logger, db, script_dir, fHDHR_web, plugins):
|
|||||||
return ERR_CODE
|
return ERR_CODE
|
||||||
|
|
||||||
|
|
||||||
def start(args, script_dir, fHDHR_web, plugins):
|
def start(args, script_dir, fHDHR_web, origin, alternative_epg):
|
||||||
"""Get Configuration for fHDHR and start"""
|
"""Get Configuration for fHDHR and start"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
settings = get_configuration(args, script_dir, plugins, fHDHR_web)
|
settings = get_configuration(args, script_dir, origin, fHDHR_web)
|
||||||
except fHDHR.exceptions.ConfigurationError as e:
|
except fHDHR.exceptions.ConfigurationError as e:
|
||||||
print(e)
|
print(e)
|
||||||
return ERR_CODE_NO_RESTART
|
return ERR_CODE_NO_RESTART
|
||||||
@ -77,19 +77,20 @@ def start(args, script_dir, fHDHR_web, plugins):
|
|||||||
|
|
||||||
db = fHDHRdb(settings)
|
db = fHDHRdb(settings)
|
||||||
|
|
||||||
return run(settings, logger, db, script_dir, fHDHR_web, plugins)
|
return run(settings, logger, db, script_dir, fHDHR_web, origin, alternative_epg)
|
||||||
|
|
||||||
|
|
||||||
def main(script_dir, fHDHR_web, plugins):
|
def main(script_dir, fHDHR_web, origin, alternative_epg):
|
||||||
"""fHDHR run script entry point"""
|
"""fHDHR run script entry point"""
|
||||||
|
|
||||||
print("Loading fHDHR %s" % fHDHR_VERSION)
|
print("Loading fHDHR %s" % fHDHR_VERSION)
|
||||||
print("Loading fHDHR_web %s" % fHDHR_web.fHDHR_web_VERSION)
|
print("Loading fHDHR_web %s" % fHDHR_web.fHDHR_web_VERSION)
|
||||||
|
print("Loading Origin Service: %s %s" % (origin.ORIGIN_NAME, origin.ORIGIN_VERSION))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
args = build_args_parser()
|
args = build_args_parser()
|
||||||
while True:
|
while True:
|
||||||
returned_code = start(args, script_dir, fHDHR_web, plugins)
|
returned_code = start(args, script_dir, fHDHR_web, origin, alternative_epg)
|
||||||
if returned_code not in ["restart"]:
|
if returned_code not in ["restart"]:
|
||||||
return returned_code
|
return returned_code
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|||||||
@ -14,8 +14,8 @@ from fHDHR.tools import isint, isfloat, is_arithmetic, is_docker
|
|||||||
|
|
||||||
class Config():
|
class Config():
|
||||||
|
|
||||||
def __init__(self, filename, script_dir, plugins, fHDHR_web):
|
def __init__(self, filename, script_dir, origin, fHDHR_web):
|
||||||
self.plugins = plugins
|
self.origin = origin
|
||||||
self.fHDHR_web = fHDHR_web
|
self.fHDHR_web = fHDHR_web
|
||||||
|
|
||||||
self.internal = {}
|
self.internal = {}
|
||||||
@ -31,11 +31,12 @@ class Config():
|
|||||||
data_dir = pathlib.Path(script_dir).joinpath('data')
|
data_dir = pathlib.Path(script_dir).joinpath('data')
|
||||||
fHDHR_web_dir = pathlib.Path(script_dir).joinpath('fHDHR_web')
|
fHDHR_web_dir = pathlib.Path(script_dir).joinpath('fHDHR_web')
|
||||||
www_dir = pathlib.Path(fHDHR_web_dir).joinpath('www_dir')
|
www_dir = pathlib.Path(fHDHR_web_dir).joinpath('www_dir')
|
||||||
origin_dir = [self.plugins.plugin_dict[x]["PATH"] for x in list(self.plugins.plugin_dict.keys()) if self.plugins.plugin_dict[x]["TYPE"] == "origin"][0]
|
origin_dir = pathlib.Path(script_dir).joinpath('origin')
|
||||||
|
|
||||||
self.internal["paths"] = {
|
self.internal["paths"] = {
|
||||||
"script_dir": script_dir,
|
"script_dir": script_dir,
|
||||||
"data_dir": data_dir,
|
"data_dir": data_dir,
|
||||||
|
"alternative_epg": pathlib.Path(script_dir).joinpath('alternative_epg'),
|
||||||
"origin": origin_dir,
|
"origin": origin_dir,
|
||||||
"origin_web": pathlib.Path(origin_dir).joinpath('origin_web'),
|
"origin_web": pathlib.Path(origin_dir).joinpath('origin_web'),
|
||||||
"cache_dir": pathlib.Path(data_dir).joinpath('cache'),
|
"cache_dir": pathlib.Path(data_dir).joinpath('cache'),
|
||||||
@ -56,25 +57,18 @@ class Config():
|
|||||||
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)
|
||||||
|
|
||||||
for dir_type in ["alt_epg", "origin"]:
|
for dir_type in ["alternative_epg", "origin"]:
|
||||||
|
|
||||||
if dir_type == "origin":
|
for file_item in os.listdir(self.internal["paths"][dir_type]):
|
||||||
dir_tops = [self.internal["paths"]["origin"]]
|
file_item_path = pathlib.Path(self.internal["paths"][dir_type]).joinpath(file_item)
|
||||||
elif dir_type == "alt_epg":
|
if file_item_path.is_dir():
|
||||||
dir_tops = [self.plugins.plugin_dict[x]["PATH"] for x in list(self.plugins.plugin_dict.keys()) if self.plugins.plugin_dict[x]["TYPE"] == "alt_epg"]
|
for sub_file_item in os.listdir(file_item_path):
|
||||||
|
sub_file_item_path = pathlib.Path(file_item_path).joinpath(sub_file_item)
|
||||||
for top_dir in dir_tops:
|
if str(sub_file_item_path).endswith("_conf.json"):
|
||||||
|
self.read_json_config(sub_file_item_path)
|
||||||
for file_item in os.listdir(top_dir):
|
else:
|
||||||
file_item_path = pathlib.Path(top_dir).joinpath(file_item)
|
if str(file_item_path).endswith("_conf.json"):
|
||||||
if file_item_path.is_dir():
|
self.read_json_config(file_item_path)
|
||||||
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)
|
|
||||||
|
|
||||||
print("Loading Configuration File: %s" % self.config_file)
|
print("Loading Configuration File: %s" % self.config_file)
|
||||||
self.read_ini_config(self.config_file)
|
self.read_ini_config(self.config_file)
|
||||||
@ -89,8 +83,7 @@ class Config():
|
|||||||
|
|
||||||
self.internal["versions"]["fHDHR_web"] = self.fHDHR_web.fHDHR_web_VERSION
|
self.internal["versions"]["fHDHR_web"] = self.fHDHR_web.fHDHR_web_VERSION
|
||||||
|
|
||||||
for plugin_item in list(self.plugins.plugin_dict.keys()):
|
self.internal["versions"][self.origin.ORIGIN_NAME] = self.origin.ORIGIN_VERSION
|
||||||
self.internal["versions"][plugin_item] = self.plugins.plugin_dict[plugin_item]["VERSION"]
|
|
||||||
|
|
||||||
self.internal["versions"]["Python"] = sys.version
|
self.internal["versions"]["Python"] = sys.version
|
||||||
|
|
||||||
@ -282,8 +275,8 @@ class Config():
|
|||||||
|
|
||||||
self.dict["origin"] = self.dict.pop(self.dict["main"]["dictpopname"])
|
self.dict["origin"] = self.dict.pop(self.dict["main"]["dictpopname"])
|
||||||
|
|
||||||
self.dict["epg"]["valid_epg_methods"] = [self.plugins.plugin_dict[x]["NAME"] for x in list(self.plugins.plugin_dict.keys()) if self.plugins.plugin_dict[x]["TYPE"] == "alt_epg"]
|
if isinstance(self.dict["epg"]["valid_epg_methods"], str):
|
||||||
self.dict["epg"]["valid_epg_methods"].extend(["origin", "blocks", None])
|
self.dict["epg"]["valid_epg_methods"] = [self.dict["epg"]["valid_epg_methods"]]
|
||||||
|
|
||||||
if self.dict["epg"]["method"] and self.dict["epg"]["method"] not in ["None"]:
|
if self.dict["epg"]["method"] and self.dict["epg"]["method"] not in ["None"]:
|
||||||
if isinstance(self.dict["epg"]["method"], str):
|
if isinstance(self.dict["epg"]["method"], str):
|
||||||
|
|||||||
@ -8,11 +8,11 @@ from .cluster import fHDHR_Cluster
|
|||||||
|
|
||||||
class fHDHR_Device():
|
class fHDHR_Device():
|
||||||
|
|
||||||
def __init__(self, fhdhr, originwrapper, plugins):
|
def __init__(self, fhdhr, originwrapper, alternative_epg):
|
||||||
|
|
||||||
self.channels = Channels(fhdhr, originwrapper)
|
self.channels = Channels(fhdhr, originwrapper)
|
||||||
|
|
||||||
self.epg = EPG(fhdhr, self.channels, originwrapper, plugins)
|
self.epg = EPG(fhdhr, self.channels, originwrapper, alternative_epg)
|
||||||
|
|
||||||
self.tuners = Tuners(fhdhr, self.epg, self.channels)
|
self.tuners = Tuners(fhdhr, self.epg, self.channels)
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
import threading
|
import threading
|
||||||
@ -9,12 +10,12 @@ from .blocks import blocksEPG
|
|||||||
|
|
||||||
class EPG():
|
class EPG():
|
||||||
|
|
||||||
def __init__(self, fhdhr, channels, originwrapper, plugins):
|
def __init__(self, fhdhr, channels, originwrapper, alternative_epg):
|
||||||
self.fhdhr = fhdhr
|
self.fhdhr = fhdhr
|
||||||
|
|
||||||
self.origin = originwrapper
|
self.origin = originwrapper
|
||||||
self.channels = channels
|
self.channels = channels
|
||||||
self.plugins = plugins
|
self.alternative_epg = alternative_epg
|
||||||
|
|
||||||
self.epgdict = {}
|
self.epgdict = {}
|
||||||
|
|
||||||
@ -153,9 +154,18 @@ class EPG():
|
|||||||
return next(item for item in event_list if item["id"] == event_id) or None
|
return next(item for item in event_list if item["id"] == event_id) or None
|
||||||
|
|
||||||
def epg_method_selfadd(self):
|
def epg_method_selfadd(self):
|
||||||
new_epgtype_list = [self.plugins.plugin_dict[x]["NAME"] for x in list(self.plugins.plugin_dict.keys()) if self.plugins.plugin_dict[x]["TYPE"] == "alt_epg"]
|
self.fhdhr.logger.info("Checking for Alternative EPG methods.")
|
||||||
|
new_epgtype_list = []
|
||||||
|
for entry in os.scandir(self.fhdhr.config.internal["paths"]["alternative_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:
|
for method in new_epgtype_list:
|
||||||
self.epg_handling[method] = eval("self.plugins.%sEPG(self.fhdhr, self.channels)" % 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))
|
||||||
|
|
||||||
def update(self, method=None):
|
def update(self, method=None):
|
||||||
|
|
||||||
|
|||||||
@ -17,25 +17,19 @@ class OriginServiceWrapper():
|
|||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
|
|
||||||
if self.origin:
|
try:
|
||||||
|
self.originservice = self.origin.OriginService(self.fhdhr)
|
||||||
try:
|
self.setup_success = True
|
||||||
self.originservice = self.origin.OriginService(self.fhdhr)
|
self.fhdhr.logger.info("%s Setup Success" % self.servicename)
|
||||||
self.setup_success = True
|
except fHDHR.exceptions.OriginSetupError as e:
|
||||||
self.fhdhr.logger.info("%s Setup Success" % self.servicename)
|
|
||||||
except fHDHR.exceptions.OriginSetupError as e:
|
|
||||||
self.originservice = None
|
|
||||||
self.fhdhr.logger.error(e)
|
|
||||||
self.setup_success = False
|
|
||||||
|
|
||||||
if self.setup_success:
|
|
||||||
self.channels = self.origin.OriginChannels(self.fhdhr, self.originservice)
|
|
||||||
self.epg = self.origin.OriginEPG(self.fhdhr)
|
|
||||||
else:
|
|
||||||
self.channels = OriginChannels_StandIN()
|
|
||||||
self.epg = OriginEPG_StandIN()
|
|
||||||
else:
|
|
||||||
self.originservice = None
|
self.originservice = None
|
||||||
|
self.fhdhr.logger.error(e)
|
||||||
|
self.setup_success = False
|
||||||
|
|
||||||
|
if self.setup_success:
|
||||||
|
self.channels = self.origin.OriginChannels(self.fhdhr, self.originservice)
|
||||||
|
self.epg = self.origin.OriginEPG(self.fhdhr)
|
||||||
|
else:
|
||||||
self.channels = OriginChannels_StandIN()
|
self.channels = OriginChannels_StandIN()
|
||||||
self.epg = OriginEPG_StandIN()
|
self.epg = OriginEPG_StandIN()
|
||||||
|
|
||||||
|
|||||||
17
main.py
17
main.py
@ -8,10 +8,21 @@ import sys
|
|||||||
import pathlib
|
import pathlib
|
||||||
|
|
||||||
from fHDHR.cli import run
|
from fHDHR.cli import run
|
||||||
import fHDHR_web
|
import alternative_epg
|
||||||
import plugins
|
|
||||||
|
try:
|
||||||
|
import fHDHR_web
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
print("Error: fHDHR_web Not Found.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
try:
|
||||||
|
import origin
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
print("Error: Origin Not Found.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
SCRIPT_DIR = pathlib.Path(os.path.dirname(os.path.abspath(__file__)))
|
SCRIPT_DIR = pathlib.Path(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(run.main(SCRIPT_DIR, fHDHR_web, plugins))
|
sys.exit(run.main(SCRIPT_DIR, fHDHR_web, origin, alternative_epg))
|
||||||
|
|||||||
@ -3,3 +3,6 @@ from .origin_service import *
|
|||||||
from .origin_channels import *
|
from .origin_channels import *
|
||||||
from .origin_epg import *
|
from .origin_epg import *
|
||||||
from .origin_web import *
|
from .origin_web import *
|
||||||
|
|
||||||
|
ORIGIN_NAME = "fHDHR_Locast"
|
||||||
|
ORIGIN_VERSION = "v0.5.0-beta"
|
||||||
@ -1,62 +0,0 @@
|
|||||||
import os
|
|
||||||
import sys
|
|
||||||
import pathlib
|
|
||||||
|
|
||||||
plugins_top_dir = os.path.dirname(__file__)
|
|
||||||
print("Importing Plugins Prior to Script Run.")
|
|
||||||
plugin_dict = {}
|
|
||||||
for entry in os.scandir(plugins_top_dir):
|
|
||||||
if entry.is_dir() and not entry.is_file() and entry.name[0] != '_':
|
|
||||||
|
|
||||||
curr_dict = {}
|
|
||||||
plugin_use = True
|
|
||||||
|
|
||||||
# Import
|
|
||||||
imp_string = "from .%s import *" % entry.name
|
|
||||||
exec(imp_string)
|
|
||||||
|
|
||||||
for plugin_item in ["NAME", "VERSION", "TYPE"]:
|
|
||||||
plugin_item_eval_string = "%s.PLUGIN_%s" % (entry.name, plugin_item)
|
|
||||||
try:
|
|
||||||
curr_dict[plugin_item] = eval(plugin_item_eval_string)
|
|
||||||
except AttributeError:
|
|
||||||
curr_dict[plugin_item] = None
|
|
||||||
|
|
||||||
if curr_dict["TYPE"] == "origin":
|
|
||||||
curr_dict["PATH"] = pathlib.Path(os.path.dirname(os.path.abspath(__file__))).joinpath(entry.name).joinpath('origin')
|
|
||||||
elif curr_dict["TYPE"] == "alt_epg":
|
|
||||||
curr_dict["PATH"] = pathlib.Path(os.path.dirname(os.path.abspath(__file__))).joinpath(entry.name)
|
|
||||||
|
|
||||||
plugin_import_print_string = "Found %s type plugin: %s %s. " % (curr_dict["TYPE"], curr_dict["NAME"], curr_dict["VERSION"])
|
|
||||||
if not any(curr_dict[plugin_item] for plugin_item in ["NAME", "VERSION", "TYPE"]):
|
|
||||||
plugin_import_print_string += " ImportWarning: Missing PLUGIN_* Value."
|
|
||||||
plugin_use = False
|
|
||||||
|
|
||||||
elif curr_dict["TYPE"] not in ["origin", "alt_epg"]:
|
|
||||||
plugin_use = False
|
|
||||||
plugin_import_print_string += " ImportWarning: Invalid PLUGIN_TYPE."
|
|
||||||
|
|
||||||
# Only allow a single origin
|
|
||||||
elif curr_dict["TYPE"] == "origin" and len([x for x in list(plugin_dict.keys()) if plugin_dict[x]["TYPE"] == "origin"]):
|
|
||||||
plugin_use = False
|
|
||||||
plugin_import_print_string += " ImportWarning: Only one Origin Allowed."
|
|
||||||
|
|
||||||
if plugin_use:
|
|
||||||
plugin_import_print_string += " Import Success"
|
|
||||||
|
|
||||||
# add to plugin_dict
|
|
||||||
print(plugin_import_print_string)
|
|
||||||
if plugin_use and entry.name not in plugin_dict:
|
|
||||||
plugin_dict[entry.name] = curr_dict
|
|
||||||
|
|
||||||
# Import Origin
|
|
||||||
if curr_dict["TYPE"] == "origin":
|
|
||||||
imp_string = "from .%s import origin" % entry.name
|
|
||||||
exec(imp_string)
|
|
||||||
if curr_dict["TYPE"] == "alt_epg":
|
|
||||||
imp_string = "from .%s import %sEPG" % (entry.name, curr_dict["NAME"])
|
|
||||||
exec(imp_string)
|
|
||||||
|
|
||||||
if not len([x for x in list(plugin_dict.keys()) if plugin_dict[x]["TYPE"] == "origin"]):
|
|
||||||
print("No Origin Plugin found.")
|
|
||||||
sys.exit(1)
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
PLUGIN_NAME = "NextPVR"
|
|
||||||
PLUGIN_VERSION = "v0.6.0-beta"
|
|
||||||
PLUGIN_TYPE = "origin"
|
|
||||||
Loading…
Reference in New Issue
Block a user