From c389801a487820c2064b9d5d65e0bc5b4171a744 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Tue, 8 Dec 2020 09:27:51 -0500 Subject: [PATCH] Seperate fHDHR_web --- fHDHR/__init__.py | 2 +- fHDHR/cli/run.py | 16 ++++++++-------- {fHDHR/http => fHDHR_web}/__init__.py | 3 +++ {fHDHR/http => fHDHR_web}/api/__init__.py | 0 {fHDHR/http => fHDHR_web}/api/channels.py | 0 {fHDHR/http => fHDHR_web}/api/cluster.py | 0 {fHDHR/http => fHDHR_web}/api/debug.py | 0 {fHDHR/http => fHDHR_web}/api/epg.py | 0 {fHDHR/http => fHDHR_web}/api/images.py | 0 {fHDHR/http => fHDHR_web}/api/m3u.py | 0 {fHDHR/http => fHDHR_web}/api/root_url.py | 0 {fHDHR/http => fHDHR_web}/api/settings.py | 0 {fHDHR/http => fHDHR_web}/api/tuners.py | 0 {fHDHR/http => fHDHR_web}/api/xmltv.py | 0 {fHDHR/http => fHDHR_web}/files/__init__.py | 0 {fHDHR/http => fHDHR_web}/files/device_xml.py | 0 {fHDHR/http => fHDHR_web}/files/favicon_ico.py | 0 {fHDHR/http => fHDHR_web}/files/style_css.py | 0 {fHDHR/http => fHDHR_web}/hdhr/__init__.py | 0 {fHDHR/http => fHDHR_web}/hdhr/auto.py | 0 {fHDHR/http => fHDHR_web}/hdhr/device_xml.py | 0 {fHDHR/http => fHDHR_web}/hdhr/discover_json.py | 0 {fHDHR/http => fHDHR_web}/hdhr/lineup_json.py | 0 {fHDHR/http => fHDHR_web}/hdhr/lineup_post.py | 0 .../hdhr/lineup_status_json.py | 0 {fHDHR/http => fHDHR_web}/hdhr/lineup_xml.py | 0 {fHDHR/http => fHDHR_web}/hdhr/tuner.py | 0 {fHDHR/http => fHDHR_web}/pages/__init__.py | 0 .../http => fHDHR_web}/pages/channels_editor.py | 0 {fHDHR/http => fHDHR_web}/pages/channels_html.py | 0 {fHDHR/http => fHDHR_web}/pages/cluster_html.py | 0 .../http => fHDHR_web}/pages/diagnostics_html.py | 0 {fHDHR/http => fHDHR_web}/pages/guide_html.py | 0 {fHDHR/http => fHDHR_web}/pages/index_html.py | 0 {fHDHR/http => fHDHR_web}/pages/origin_html.py | 0 {fHDHR/http => fHDHR_web}/pages/settings_html.py | 0 {fHDHR/http => fHDHR_web}/pages/tuners_html.py | 0 {fHDHR/http => fHDHR_web}/pages/version_html.py | 0 {fHDHR/http => fHDHR_web}/pages/xmltv_html.py | 0 {fHDHR/http => fHDHR_web}/rmg/__init__.py | 0 {fHDHR/http => fHDHR_web}/rmg/device_xml.py | 0 .../http => fHDHR_web}/rmg/devices_devicekey.py | 0 .../rmg/devices_devicekey_channels.py | 0 .../rmg/devices_devicekey_media.py | 0 .../rmg/devices_devicekey_networks.py | 0 .../rmg/devices_devicekey_prefs.py | 0 .../rmg/devices_devicekey_scan.py | 0 .../rmg/devices_devicekey_scanners.py | 0 .../http => fHDHR_web}/rmg/devices_discover.py | 0 {fHDHR/http => fHDHR_web}/rmg/devices_probe.py | 0 {fHDHR/http => fHDHR_web}/rmg/rmg_ident_xml.py | 0 51 files changed, 12 insertions(+), 9 deletions(-) rename {fHDHR/http => fHDHR_web}/__init__.py (99%) rename {fHDHR/http => fHDHR_web}/api/__init__.py (100%) rename {fHDHR/http => fHDHR_web}/api/channels.py (100%) rename {fHDHR/http => fHDHR_web}/api/cluster.py (100%) rename {fHDHR/http => fHDHR_web}/api/debug.py (100%) rename {fHDHR/http => fHDHR_web}/api/epg.py (100%) rename {fHDHR/http => fHDHR_web}/api/images.py (100%) rename {fHDHR/http => fHDHR_web}/api/m3u.py (100%) rename {fHDHR/http => fHDHR_web}/api/root_url.py (100%) rename {fHDHR/http => fHDHR_web}/api/settings.py (100%) rename {fHDHR/http => fHDHR_web}/api/tuners.py (100%) rename {fHDHR/http => fHDHR_web}/api/xmltv.py (100%) rename {fHDHR/http => fHDHR_web}/files/__init__.py (100%) rename {fHDHR/http => fHDHR_web}/files/device_xml.py (100%) rename {fHDHR/http => fHDHR_web}/files/favicon_ico.py (100%) rename {fHDHR/http => fHDHR_web}/files/style_css.py (100%) rename {fHDHR/http => fHDHR_web}/hdhr/__init__.py (100%) rename {fHDHR/http => fHDHR_web}/hdhr/auto.py (100%) rename {fHDHR/http => fHDHR_web}/hdhr/device_xml.py (100%) rename {fHDHR/http => fHDHR_web}/hdhr/discover_json.py (100%) rename {fHDHR/http => fHDHR_web}/hdhr/lineup_json.py (100%) rename {fHDHR/http => fHDHR_web}/hdhr/lineup_post.py (100%) rename {fHDHR/http => fHDHR_web}/hdhr/lineup_status_json.py (100%) rename {fHDHR/http => fHDHR_web}/hdhr/lineup_xml.py (100%) rename {fHDHR/http => fHDHR_web}/hdhr/tuner.py (100%) rename {fHDHR/http => fHDHR_web}/pages/__init__.py (100%) rename {fHDHR/http => fHDHR_web}/pages/channels_editor.py (100%) rename {fHDHR/http => fHDHR_web}/pages/channels_html.py (100%) rename {fHDHR/http => fHDHR_web}/pages/cluster_html.py (100%) rename {fHDHR/http => fHDHR_web}/pages/diagnostics_html.py (100%) rename {fHDHR/http => fHDHR_web}/pages/guide_html.py (100%) rename {fHDHR/http => fHDHR_web}/pages/index_html.py (100%) rename {fHDHR/http => fHDHR_web}/pages/origin_html.py (100%) rename {fHDHR/http => fHDHR_web}/pages/settings_html.py (100%) rename {fHDHR/http => fHDHR_web}/pages/tuners_html.py (100%) rename {fHDHR/http => fHDHR_web}/pages/version_html.py (100%) rename {fHDHR/http => fHDHR_web}/pages/xmltv_html.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/__init__.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/device_xml.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/devices_devicekey.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/devices_devicekey_channels.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/devices_devicekey_media.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/devices_devicekey_networks.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/devices_devicekey_prefs.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/devices_devicekey_scan.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/devices_devicekey_scanners.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/devices_discover.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/devices_probe.py (100%) rename {fHDHR/http => fHDHR_web}/rmg/rmg_ident_xml.py (100%) diff --git a/fHDHR/__init__.py b/fHDHR/__init__.py index 9dada5c..a8e9384 100644 --- a/fHDHR/__init__.py +++ b/fHDHR/__init__.py @@ -21,7 +21,7 @@ class fHDHR_INT_OBJ(): class fHDHR_OBJ(): - def __init__(self, settings, logger, db, alternative_epg, origin): + def __init__(self, settings, logger, db, origin, alternative_epg): self.fhdhr = fHDHR_INT_OBJ(settings, logger, db) self.originwrapper = OriginServiceWrapper(self.fhdhr, origin) diff --git a/fHDHR/cli/run.py b/fHDHR/cli/run.py index 67af119..6a90246 100644 --- a/fHDHR/cli/run.py +++ b/fHDHR/cli/run.py @@ -9,7 +9,6 @@ import platform from fHDHR import fHDHR_VERSION, fHDHR_OBJ import fHDHR.exceptions import fHDHR.config -from fHDHR.http import fHDHR_HTTP_Server from fHDHR.db import fHDHRdb ERR_CODE = 1 @@ -38,10 +37,10 @@ def get_configuration(args, script_dir, origin): return fHDHR.config.Config(args.cfg, script_dir, origin) -def run(settings, logger, db, alternative_epg, origin): +def run(settings, logger, db, script_dir, fHDHR_web, origin, alternative_epg): - fhdhr = fHDHR_OBJ(settings, logger, db, alternative_epg, origin) - fhdhrweb = fHDHR_HTTP_Server(fhdhr) + fhdhr = fHDHR_OBJ(settings, logger, db, origin, alternative_epg) + fhdhrweb = fHDHR_web.fHDHR_HTTP_Server(fhdhr) try: @@ -81,7 +80,7 @@ def run(settings, logger, db, alternative_epg, origin): return ERR_CODE -def start(args, script_dir, alternative_epg, origin): +def start(args, script_dir, fHDHR_web, origin, alternative_epg): """Get Configuration for fHDHR and start""" try: @@ -94,18 +93,19 @@ def start(args, script_dir, alternative_epg, origin): db = fHDHRdb(settings) - return run(settings, logger, db, alternative_epg, origin) + return run(settings, logger, db, script_dir, fHDHR_web, origin, alternative_epg) -def main(script_dir, alternative_epg, origin): +def main(script_dir, fHDHR_web, origin, alternative_epg): """fHDHR run script entry point""" print("Loading fHDHR %s" % fHDHR_VERSION) + print("Loading fHDHR_web %s" % fHDHR_web.fHDHR_web_VERSION) print("Loading Origin Service: %s %s" % (origin.ORIGIN_NAME, origin.ORIGIN_VERSION)) try: args = build_args_parser() - return start(args, script_dir, alternative_epg, origin) + return start(args, script_dir, fHDHR_web, origin, alternative_epg) except KeyboardInterrupt: print("\n\nInterrupted") return ERR_CODE diff --git a/fHDHR/http/__init__.py b/fHDHR_web/__init__.py similarity index 99% rename from fHDHR/http/__init__.py rename to fHDHR_web/__init__.py index ab75db5..86b9742 100644 --- a/fHDHR/http/__init__.py +++ b/fHDHR_web/__init__.py @@ -8,6 +8,9 @@ from .rmg import fHDHR_RMG from .api import fHDHR_API +fHDHR_web_VERSION = "v0.4.0-beta" + + class fHDHR_HTTP_Server(): app = None diff --git a/fHDHR/http/api/__init__.py b/fHDHR_web/api/__init__.py similarity index 100% rename from fHDHR/http/api/__init__.py rename to fHDHR_web/api/__init__.py diff --git a/fHDHR/http/api/channels.py b/fHDHR_web/api/channels.py similarity index 100% rename from fHDHR/http/api/channels.py rename to fHDHR_web/api/channels.py diff --git a/fHDHR/http/api/cluster.py b/fHDHR_web/api/cluster.py similarity index 100% rename from fHDHR/http/api/cluster.py rename to fHDHR_web/api/cluster.py diff --git a/fHDHR/http/api/debug.py b/fHDHR_web/api/debug.py similarity index 100% rename from fHDHR/http/api/debug.py rename to fHDHR_web/api/debug.py diff --git a/fHDHR/http/api/epg.py b/fHDHR_web/api/epg.py similarity index 100% rename from fHDHR/http/api/epg.py rename to fHDHR_web/api/epg.py diff --git a/fHDHR/http/api/images.py b/fHDHR_web/api/images.py similarity index 100% rename from fHDHR/http/api/images.py rename to fHDHR_web/api/images.py diff --git a/fHDHR/http/api/m3u.py b/fHDHR_web/api/m3u.py similarity index 100% rename from fHDHR/http/api/m3u.py rename to fHDHR_web/api/m3u.py diff --git a/fHDHR/http/api/root_url.py b/fHDHR_web/api/root_url.py similarity index 100% rename from fHDHR/http/api/root_url.py rename to fHDHR_web/api/root_url.py diff --git a/fHDHR/http/api/settings.py b/fHDHR_web/api/settings.py similarity index 100% rename from fHDHR/http/api/settings.py rename to fHDHR_web/api/settings.py diff --git a/fHDHR/http/api/tuners.py b/fHDHR_web/api/tuners.py similarity index 100% rename from fHDHR/http/api/tuners.py rename to fHDHR_web/api/tuners.py diff --git a/fHDHR/http/api/xmltv.py b/fHDHR_web/api/xmltv.py similarity index 100% rename from fHDHR/http/api/xmltv.py rename to fHDHR_web/api/xmltv.py diff --git a/fHDHR/http/files/__init__.py b/fHDHR_web/files/__init__.py similarity index 100% rename from fHDHR/http/files/__init__.py rename to fHDHR_web/files/__init__.py diff --git a/fHDHR/http/files/device_xml.py b/fHDHR_web/files/device_xml.py similarity index 100% rename from fHDHR/http/files/device_xml.py rename to fHDHR_web/files/device_xml.py diff --git a/fHDHR/http/files/favicon_ico.py b/fHDHR_web/files/favicon_ico.py similarity index 100% rename from fHDHR/http/files/favicon_ico.py rename to fHDHR_web/files/favicon_ico.py diff --git a/fHDHR/http/files/style_css.py b/fHDHR_web/files/style_css.py similarity index 100% rename from fHDHR/http/files/style_css.py rename to fHDHR_web/files/style_css.py diff --git a/fHDHR/http/hdhr/__init__.py b/fHDHR_web/hdhr/__init__.py similarity index 100% rename from fHDHR/http/hdhr/__init__.py rename to fHDHR_web/hdhr/__init__.py diff --git a/fHDHR/http/hdhr/auto.py b/fHDHR_web/hdhr/auto.py similarity index 100% rename from fHDHR/http/hdhr/auto.py rename to fHDHR_web/hdhr/auto.py diff --git a/fHDHR/http/hdhr/device_xml.py b/fHDHR_web/hdhr/device_xml.py similarity index 100% rename from fHDHR/http/hdhr/device_xml.py rename to fHDHR_web/hdhr/device_xml.py diff --git a/fHDHR/http/hdhr/discover_json.py b/fHDHR_web/hdhr/discover_json.py similarity index 100% rename from fHDHR/http/hdhr/discover_json.py rename to fHDHR_web/hdhr/discover_json.py diff --git a/fHDHR/http/hdhr/lineup_json.py b/fHDHR_web/hdhr/lineup_json.py similarity index 100% rename from fHDHR/http/hdhr/lineup_json.py rename to fHDHR_web/hdhr/lineup_json.py diff --git a/fHDHR/http/hdhr/lineup_post.py b/fHDHR_web/hdhr/lineup_post.py similarity index 100% rename from fHDHR/http/hdhr/lineup_post.py rename to fHDHR_web/hdhr/lineup_post.py diff --git a/fHDHR/http/hdhr/lineup_status_json.py b/fHDHR_web/hdhr/lineup_status_json.py similarity index 100% rename from fHDHR/http/hdhr/lineup_status_json.py rename to fHDHR_web/hdhr/lineup_status_json.py diff --git a/fHDHR/http/hdhr/lineup_xml.py b/fHDHR_web/hdhr/lineup_xml.py similarity index 100% rename from fHDHR/http/hdhr/lineup_xml.py rename to fHDHR_web/hdhr/lineup_xml.py diff --git a/fHDHR/http/hdhr/tuner.py b/fHDHR_web/hdhr/tuner.py similarity index 100% rename from fHDHR/http/hdhr/tuner.py rename to fHDHR_web/hdhr/tuner.py diff --git a/fHDHR/http/pages/__init__.py b/fHDHR_web/pages/__init__.py similarity index 100% rename from fHDHR/http/pages/__init__.py rename to fHDHR_web/pages/__init__.py diff --git a/fHDHR/http/pages/channels_editor.py b/fHDHR_web/pages/channels_editor.py similarity index 100% rename from fHDHR/http/pages/channels_editor.py rename to fHDHR_web/pages/channels_editor.py diff --git a/fHDHR/http/pages/channels_html.py b/fHDHR_web/pages/channels_html.py similarity index 100% rename from fHDHR/http/pages/channels_html.py rename to fHDHR_web/pages/channels_html.py diff --git a/fHDHR/http/pages/cluster_html.py b/fHDHR_web/pages/cluster_html.py similarity index 100% rename from fHDHR/http/pages/cluster_html.py rename to fHDHR_web/pages/cluster_html.py diff --git a/fHDHR/http/pages/diagnostics_html.py b/fHDHR_web/pages/diagnostics_html.py similarity index 100% rename from fHDHR/http/pages/diagnostics_html.py rename to fHDHR_web/pages/diagnostics_html.py diff --git a/fHDHR/http/pages/guide_html.py b/fHDHR_web/pages/guide_html.py similarity index 100% rename from fHDHR/http/pages/guide_html.py rename to fHDHR_web/pages/guide_html.py diff --git a/fHDHR/http/pages/index_html.py b/fHDHR_web/pages/index_html.py similarity index 100% rename from fHDHR/http/pages/index_html.py rename to fHDHR_web/pages/index_html.py diff --git a/fHDHR/http/pages/origin_html.py b/fHDHR_web/pages/origin_html.py similarity index 100% rename from fHDHR/http/pages/origin_html.py rename to fHDHR_web/pages/origin_html.py diff --git a/fHDHR/http/pages/settings_html.py b/fHDHR_web/pages/settings_html.py similarity index 100% rename from fHDHR/http/pages/settings_html.py rename to fHDHR_web/pages/settings_html.py diff --git a/fHDHR/http/pages/tuners_html.py b/fHDHR_web/pages/tuners_html.py similarity index 100% rename from fHDHR/http/pages/tuners_html.py rename to fHDHR_web/pages/tuners_html.py diff --git a/fHDHR/http/pages/version_html.py b/fHDHR_web/pages/version_html.py similarity index 100% rename from fHDHR/http/pages/version_html.py rename to fHDHR_web/pages/version_html.py diff --git a/fHDHR/http/pages/xmltv_html.py b/fHDHR_web/pages/xmltv_html.py similarity index 100% rename from fHDHR/http/pages/xmltv_html.py rename to fHDHR_web/pages/xmltv_html.py diff --git a/fHDHR/http/rmg/__init__.py b/fHDHR_web/rmg/__init__.py similarity index 100% rename from fHDHR/http/rmg/__init__.py rename to fHDHR_web/rmg/__init__.py diff --git a/fHDHR/http/rmg/device_xml.py b/fHDHR_web/rmg/device_xml.py similarity index 100% rename from fHDHR/http/rmg/device_xml.py rename to fHDHR_web/rmg/device_xml.py diff --git a/fHDHR/http/rmg/devices_devicekey.py b/fHDHR_web/rmg/devices_devicekey.py similarity index 100% rename from fHDHR/http/rmg/devices_devicekey.py rename to fHDHR_web/rmg/devices_devicekey.py diff --git a/fHDHR/http/rmg/devices_devicekey_channels.py b/fHDHR_web/rmg/devices_devicekey_channels.py similarity index 100% rename from fHDHR/http/rmg/devices_devicekey_channels.py rename to fHDHR_web/rmg/devices_devicekey_channels.py diff --git a/fHDHR/http/rmg/devices_devicekey_media.py b/fHDHR_web/rmg/devices_devicekey_media.py similarity index 100% rename from fHDHR/http/rmg/devices_devicekey_media.py rename to fHDHR_web/rmg/devices_devicekey_media.py diff --git a/fHDHR/http/rmg/devices_devicekey_networks.py b/fHDHR_web/rmg/devices_devicekey_networks.py similarity index 100% rename from fHDHR/http/rmg/devices_devicekey_networks.py rename to fHDHR_web/rmg/devices_devicekey_networks.py diff --git a/fHDHR/http/rmg/devices_devicekey_prefs.py b/fHDHR_web/rmg/devices_devicekey_prefs.py similarity index 100% rename from fHDHR/http/rmg/devices_devicekey_prefs.py rename to fHDHR_web/rmg/devices_devicekey_prefs.py diff --git a/fHDHR/http/rmg/devices_devicekey_scan.py b/fHDHR_web/rmg/devices_devicekey_scan.py similarity index 100% rename from fHDHR/http/rmg/devices_devicekey_scan.py rename to fHDHR_web/rmg/devices_devicekey_scan.py diff --git a/fHDHR/http/rmg/devices_devicekey_scanners.py b/fHDHR_web/rmg/devices_devicekey_scanners.py similarity index 100% rename from fHDHR/http/rmg/devices_devicekey_scanners.py rename to fHDHR_web/rmg/devices_devicekey_scanners.py diff --git a/fHDHR/http/rmg/devices_discover.py b/fHDHR_web/rmg/devices_discover.py similarity index 100% rename from fHDHR/http/rmg/devices_discover.py rename to fHDHR_web/rmg/devices_discover.py diff --git a/fHDHR/http/rmg/devices_probe.py b/fHDHR_web/rmg/devices_probe.py similarity index 100% rename from fHDHR/http/rmg/devices_probe.py rename to fHDHR_web/rmg/devices_probe.py diff --git a/fHDHR/http/rmg/rmg_ident_xml.py b/fHDHR_web/rmg/rmg_ident_xml.py similarity index 100% rename from fHDHR/http/rmg/rmg_ident_xml.py rename to fHDHR_web/rmg/rmg_ident_xml.py