mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-28 18:36:07 +00:00
Fixed IP display on startup
This commit is contained in:
parent
1726fce73f
commit
9315be7461
|
@ -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, url, portable))
|
||||
t = Thread(target=run_server, args=(port, "0.0.0.0", portable))
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
||||
|
|
|
@ -270,9 +270,13 @@ def openDownloadsFolder():
|
|||
elif sys.platform == 'win32':
|
||||
subprocess.check_call(['explorer', folder])
|
||||
|
||||
def run_server(port, host, portable=None):
|
||||
def run_server(port, host="0.0.0.0", portable=None):
|
||||
app.initialize(portable)
|
||||
print("Starting server at http://" + host + ":" + str(port))
|
||||
if host == "0.0.0.0":
|
||||
displayHost = "127.0.0.1"
|
||||
else:
|
||||
displayHost = host
|
||||
print("Starting server at http://" + displayHost + ":" + str(port))
|
||||
socketio.run(server, host=host, port=port)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue