From 3b24bbee5f9c67edcac95b13acb0bf56d218de6a Mon Sep 17 00:00:00 2001
From: JonnyWong16
Date: Wed, 20 Nov 2019 18:50:17 -0800
Subject: [PATCH] Add web server HTTP username and password to setup wizard
---
Tautulli.py | 26 ++++--------
data/interfaces/default/welcome.html | 60 +++++++++++++++++++++++++---
plexpy/__init__.py | 5 +--
plexpy/webserve.py | 32 ++++++++-------
plexpy/webstart.py | 30 ++++++++++++++
5 files changed, 110 insertions(+), 43 deletions(-)
diff --git a/Tautulli.py b/Tautulli.py
index d23c36df..74a9789d 100755
--- a/Tautulli.py
+++ b/Tautulli.py
@@ -234,31 +234,19 @@ def main():
plexpy.CONFIG.ENABLE_HTTPS = False
# Try to start the server. Will exit here is address is already in use.
- web_config = {
- 'http_port': plexpy.HTTP_PORT,
- 'http_host': plexpy.CONFIG.HTTP_HOST,
- 'http_root': plexpy.CONFIG.HTTP_ROOT,
- 'http_environment': plexpy.CONFIG.HTTP_ENVIRONMENT,
- 'http_proxy': plexpy.CONFIG.HTTP_PROXY,
- 'enable_https': plexpy.CONFIG.ENABLE_HTTPS,
- 'https_cert': plexpy.CONFIG.HTTPS_CERT,
- 'https_cert_chain': plexpy.CONFIG.HTTPS_CERT_CHAIN,
- 'https_key': plexpy.CONFIG.HTTPS_KEY,
- 'http_username': plexpy.CONFIG.HTTP_USERNAME,
- 'http_password': plexpy.CONFIG.HTTP_PASSWORD,
- 'http_basic_auth': plexpy.CONFIG.HTTP_BASIC_AUTH
- }
- webstart.initialize(web_config)
+ webstart.start()
+
+ # Windows system tray icon
+ if os.name == 'nt' and plexpy.CONFIG.WIN_SYS_TRAY:
+ plexpy.win_system_tray()
+
+ logger.info("Tautulli is ready!")
# Open webbrowser
if plexpy.CONFIG.LAUNCH_BROWSER and not args.nolaunch and not plexpy.DEV:
plexpy.launch_browser(plexpy.CONFIG.HTTP_HOST, plexpy.HTTP_PORT,
plexpy.HTTP_ROOT)
- # Windows system tray icon
- if os.name == 'nt' and plexpy.CONFIG.WIN_SYS_TRAY:
- plexpy.win_system_tray()
-
# Wait endlessy for a signal to happen
while True:
if not plexpy.SIGNAL:
diff --git a/data/interfaces/default/welcome.html b/data/interfaces/default/welcome.html
index 556d8497..60f38e7f 100644
--- a/data/interfaces/default/welcome.html
+++ b/data/interfaces/default/welcome.html
@@ -67,7 +67,36 @@
+
+
Authentication
+
+
+
+
+
+
+
+
+