mirror of
https://github.com/Dvorinka/SpotifyRecAlg.git
synced 2026-06-03 20:13:03 +00:00
19 lines
595 B
Python
19 lines
595 B
Python
from swingmusic.settings import TCOLOR, Metadata, Paths
|
|
from swingmusic.utils.network import get_ip
|
|
|
|
|
|
def log_startup_info(host: str, port: int):
|
|
print(f"{TCOLOR.HEADER}Swing Music v{Metadata.version} {TCOLOR.ENDC}")
|
|
|
|
addresses = [host]
|
|
|
|
if host == "0.0.0.0":
|
|
remote_ip = get_ip()
|
|
addresses.extend(["127.0.0.1"] + ([remote_ip] if remote_ip else []))
|
|
|
|
print("Server running on:\n")
|
|
for address in addresses:
|
|
print(f"{TCOLOR.OKGREEN}http://{address}:{port}{TCOLOR.ENDC}")
|
|
|
|
print(f"\n{TCOLOR.YELLOW}Data folder: {Paths().config_dir}{TCOLOR.ENDC}\n")
|