diff --git a/deemix_gui.py b/deemix_gui.py index 3c35664..b821fc7 100644 --- a/deemix_gui.py +++ b/deemix_gui.py @@ -47,7 +47,7 @@ if __name__ == '__main__': portable = path.join(path.dirname(path.realpath(__file__)), 'config') else: portable = None - t = Thread(target=run_server, args=(port, "0.0.0.0", portable)) + t = Thread(target=run_server, args=(port, url, portable)) t.daemon = True t.start() diff --git a/server.py b/server.py index 26e7a65..cf1bdec 100644 --- a/server.py +++ b/server.py @@ -270,13 +270,9 @@ def openDownloadsFolder(): elif sys.platform == 'win32': subprocess.check_call(['explorer', folder]) -def run_server(port, host="0.0.0.0", portable=None): +def run_server(port, host="127.0.0.1", portable=None): app.initialize(portable) - if host == "0.0.0.0": - displayHost = "127.0.0.1" - else: - displayHost = host - print("Starting server at http://" + displayHost + ":" + str(port)) + print("Starting server at http://" + host + ":" + str(port)) socketio.run(server, host=host, port=port) @@ -294,5 +290,5 @@ if __name__ == '__main__': if '--host' in sys.argv: host = str(sys.argv[sys.argv.index("--host")+1]) else: - host = "0.0.0.0" + host = "127.0.0.1" run_server(port, host, portable)