From 64322eabd12e6a603aa00e7a4bf1080ac4ccaafd Mon Sep 17 00:00:00 2001 From: Remy Date: Fri, 27 May 2011 14:29:33 -0700 Subject: [PATCH] fixed issue with browser not finding 0.0.0.0 on Windows. Now redirects to localhost --- headphones.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/headphones.py b/headphones.py index be4aa322..c4de84d1 100755 --- a/headphones.py +++ b/headphones.py @@ -81,7 +81,11 @@ def serverstart(): def browser(): - webbrowser.open('http://' + settings['http_host'] + ':' + settings['http_port']) + if settings['http_host'] == '0.0.0.0': + host = 'localhost' + else: + host = settings['http_host'] + webbrowser.open('http://' + host + ':' + settings['http_port']) if settings['launch_browser'] == '1':