diff --git a/data/internal_config/epg.json b/data/internal_config/epg.json index da03d3d..9ebc677 100644 --- a/data/internal_config/epg.json +++ b/data/internal_config/epg.json @@ -11,9 +11,14 @@ "config_web": true }, "update_frequency":{ - "value": 14400, + "value": 43200, "config_file": true, "config_web": true - } + }, + "valid_epg_methods":{ + "value": "None,blocks", + "config_file": false, + "config_web": false + } } } diff --git a/data/internal_config/main.json b/data/internal_config/main.json index d2bc31e..ab8e4c7 100644 --- a/data/internal_config/main.json +++ b/data/internal_config/main.json @@ -30,11 +30,6 @@ "config_file": false, "config_web": false }, - "valid_epg_methods":{ - "value": "None,blocks", - "config_file": false, - "config_web": false - }, "required":{ "value": "none", "config_file": false, diff --git a/fHDHR/config/__init__.py b/fHDHR/config/__init__.py index 02483ca..a290793 100644 --- a/fHDHR/config/__init__.py +++ b/fHDHR/config/__init__.py @@ -243,8 +243,8 @@ class Config(): self.dict["origin"] = self.dict.pop(self.dict["main"]["dictpopname"]) - if isinstance(self.dict["main"]["valid_epg_methods"], str): - self.dict["main"]["valid_epg_methods"] = [self.dict["main"]["valid_epg_methods"]] + if isinstance(self.dict["epg"]["valid_epg_methods"], str): + 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 isinstance(self.dict["epg"]["method"], str): diff --git a/fHDHR/device/epg/__init__.py b/fHDHR/device/epg/__init__.py index 2804730..b519727 100644 --- a/fHDHR/device/epg/__init__.py +++ b/fHDHR/device/epg/__init__.py @@ -18,7 +18,7 @@ class EPG(): self.epgdict = {} self.epg_methods = self.fhdhr.config.dict["epg"]["method"] - self.valid_epg_methods = [x for x in self.fhdhr.config.dict["main"]["valid_epg_methods"] if x and x not in [None, "None"]] + self.valid_epg_methods = [x for x in self.fhdhr.config.dict["epg"]["valid_epg_methods"] if x and x not in [None, "None"]] self.blocks = blocksEPG(self.fhdhr, self.channels) self.epg_handling = { @@ -43,7 +43,7 @@ class EPG(): if not method: method = self.def_method if (method == self.fhdhr.config.dict["main"]["dictpopname"] or - method not in self.fhdhr.config.dict["main"]["valid_epg_methods"]): + method not in self.fhdhr.config.dict["epg"]["valid_epg_methods"]): method = "origin" epgtypename = method @@ -78,7 +78,7 @@ class EPG(): if not method: method = self.def_method if (method == self.fhdhr.config.dict["main"]["dictpopname"] or - method not in self.fhdhr.config.dict["main"]["valid_epg_methods"]): + method not in self.fhdhr.config.dict["epg"]["valid_epg_methods"]): method = "origin" channel_guide_list = [] @@ -95,7 +95,7 @@ class EPG(): if not method: method = self.def_method if (method == self.fhdhr.config.dict["main"]["dictpopname"] or - method not in self.fhdhr.config.dict["main"]["valid_epg_methods"]): + method not in self.fhdhr.config.dict["epg"]["valid_epg_methods"]): method = "origin" if method not in list(self.epgdict.keys()): @@ -147,7 +147,7 @@ class EPG(): def update(self, method=None): if (not method or - method not in self.fhdhr.config.dict["main"]["valid_epg_methods"]): + method not in self.fhdhr.config.dict["epg"]["valid_epg_methods"]): method = self.def_method if method == self.fhdhr.config.dict["main"]["dictpopname"]: diff --git a/fHDHR_web/api/epg.py b/fHDHR_web/api/epg.py index 78d619f..d7c67ec 100644 --- a/fHDHR_web/api/epg.py +++ b/fHDHR_web/api/epg.py @@ -20,7 +20,7 @@ class EPG(): method = request.args.get('method', default="get", type=str) source = request.args.get('source', default=self.fhdhr.config.dict["epg"]["def_method"], type=str) - if source not in self.fhdhr.config.dict["main"]["valid_epg_methods"]: + if source not in self.fhdhr.config.dict["epg"]["valid_epg_methods"]: return "%s Invalid xmltv method" % source redirect_url = request.args.get('redirect', default=None, type=str) diff --git a/fHDHR_web/api/images.py b/fHDHR_web/api/images.py index 351ff3f..dce67e2 100644 --- a/fHDHR_web/api/images.py +++ b/fHDHR_web/api/images.py @@ -26,7 +26,7 @@ class Images(): elif method == "get": source = request.args.get('source', default=self.fhdhr.config.dict["epg"]["method"], type=str) - if source in self.fhdhr.config.dict["main"]["valid_epg_methods"]: + if source in self.fhdhr.config.dict["epg"]["valid_epg_methods"]: image_type = request.args.get('type', default="content", type=str) if image_type in ["content", "channel"]: image_id = request.args.get('id', default=None, type=str) diff --git a/fHDHR_web/api/xmltv.py b/fHDHR_web/api/xmltv.py index 3ff34ba..a4064fb 100644 --- a/fHDHR_web/api/xmltv.py +++ b/fHDHR_web/api/xmltv.py @@ -30,7 +30,7 @@ class xmlTV(): method = request.args.get('method', default="get", type=str) source = request.args.get('source', default=self.fhdhr.config.dict["epg"]["def_method"], type=str) - if source not in self.fhdhr.config.dict["main"]["valid_epg_methods"]: + if source not in self.fhdhr.config.dict["epg"]["valid_epg_methods"]: return "%s Invalid xmltv method" % source redirect_url = request.args.get('redirect', default=None, type=str) diff --git a/fHDHR_web/templates/xmltv.html b/fHDHR_web/templates/xmltv.html index 697febc..720ff1c 100644 --- a/fHDHR_web/templates/xmltv.html +++ b/fHDHR_web/templates/xmltv.html @@ -12,7 +12,7 @@ Options - {% for epg_method in fhdhr.config.dict["main"]["valid_epg_methods"] %} + {% for epg_method in fhdhr.config.dict["epg"]["valid_epg_methods"] %} {% if epg_method not in [None, "None"] %} {% set epg_method_name = epg_method %} {% if epg_method == "origin" %} diff --git a/origin/origin_conf.json b/origin/origin_conf.json index cd02536..61d6a9b 100644 --- a/origin/origin_conf.json +++ b/origin/origin_conf.json @@ -15,11 +15,6 @@ "config_file": false, "config_web": false }, - "valid_epg_methods":{ - "value": "None,blocks,origin,zap2it", - "config_file": false, - "config_web": false - }, "required":{ "value": "nextpvr/pin", "config_file": false, @@ -32,16 +27,6 @@ "config_file": true, "config_web": true }, - "stream_type":{ - "value": "direct", - "config_file": true, - "config_web": true - }, - "tuner_count":{ - "value": 4, - "config_file": true, - "config_web": true - }, "reporting_firmware_name":{ "value": "fHDHR_NextPVR", "config_file": true, @@ -54,11 +39,11 @@ "config_file": true, "config_web": true }, - "update_frequency":{ - "value": 43200, - "config_file": true, - "config_web": true - } + "valid_epg_methods":{ + "value": "None,blocks,origin,zap2it", + "config_file": false, + "config_web": false + } }, "nextpvr":{ "address":{