diff options
author | MaZderMind <github@mazdermind.de> | 2016-01-06 12:59:40 +0100 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2016-01-06 12:59:40 +0100 |
commit | 32b9a74da6a2dc48412f5c5e7756ec447b127f48 (patch) | |
tree | 6854bde564fe8a55ad30012340ee43c2fa971fd2 /voctogui | |
parent | 84e591a7e5301e9841da474d22b0d6c9f6c1fde5 (diff) |
default to disabling the preview encoders and instead warn on the gui
Diffstat (limited to 'voctogui')
-rwxr-xr-x | voctogui/voctogui.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/voctogui/voctogui.py b/voctogui/voctogui.py index 083b004..123a305 100755 --- a/voctogui/voctogui.py +++ b/voctogui/voctogui.py @@ -112,6 +112,19 @@ def main(): # fetch config from server Config.fetchServerConfig() + # Warn when connecting to a non-local core without preview-encoders enabled + # the list-comparison is not complete (one could use a local hostname or the local system ip) + # but it's only here to warn that one might be making a mistake + use_previews = Config.getboolean('previews', 'enabled') and Config.getboolean('previews', 'use') + looks_like_localhost = Config.get('server', 'host') in ['::1', '127.0.0.1', 'localhost'] + if not use_previews and not looks_like_localhost: + logging.warn( + 'Connecting to `%s` (which looks like a remote host) might not work without enabeling ' + 'the preview encoders (set `[previews] enabled=true` on the core) or it might saturate ' + 'your ethernet link between the two machines.', + Config.get('server', 'host') + ) + # switch connection to nonblocking, event-driven mode Connection.enterNonblockingMode() |