diff options
-rw-r--r-- | voctogui/lib/args.py | 2 | ||||
-rw-r--r-- | voctogui/lib/videodisplay.py | 3 | ||||
-rwxr-xr-x | voctogui/voctogui.py | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/voctogui/lib/args.py b/voctogui/lib/args.py index db87fd7..83cd40d 100644 --- a/voctogui/lib/args.py +++ b/voctogui/lib/args.py @@ -18,5 +18,7 @@ parser.add_argument('-i', '--ini-file', action='store', parser.add_argument('-u', '--ui-file', action='store', help="Load a custom .ui-File") +parser.add_argument('-H', '--host', action='store', + help="Connect to this host instead of the configured one.") Args = parser.parse_args() diff --git a/voctogui/lib/videodisplay.py b/voctogui/lib/videodisplay.py index c5a639b..744e1aa 100644 --- a/voctogui/lib/videodisplay.py +++ b/voctogui/lib/videodisplay.py @@ -1,6 +1,7 @@ import logging from gi.repository import Gst +from lib.args import Args from lib.config import Config from lib.clock import Clock @@ -105,7 +106,7 @@ class VideoDisplay(object): acaps=Config.get('mix', 'audiocaps'), vcaps=Config.get('mix', 'videocaps'), previewcaps=Config.get('previews', 'videocaps'), - host=Config.get('server', 'host'), + host=Args.host if Args.host else Config.get('server', 'host'), port=port, ) diff --git a/voctogui/voctogui.py b/voctogui/voctogui.py index 6611480..9ae3af5 100755 --- a/voctogui/voctogui.py +++ b/voctogui/voctogui.py @@ -109,7 +109,7 @@ def main(): # establish a synchronus connection to server Connection.establish( - Config.get('server', 'host')) + Args.host if Args.host else Config.get('server', 'host')) # fetch config from server Config.fetchServerConfig() |