mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
f891c28c2e
+ fix cpu count multiprocessing errors
27 lines
774 B
Python
27 lines
774 B
Python
from app.settings import TCOLOR, Info, Paths
|
|
from app.utils.network import get_ip
|
|
import click
|
|
|
|
|
|
def log_startup_info(host: str, port: int):
|
|
lines = "-"*30
|
|
# clears terminal 👇
|
|
# os.system("cls" if os.name == "nt" else "echo -e \\\\033c")
|
|
|
|
click.echo(f"{TCOLOR.HEADER}Swing Music v{Info.SWINGMUSIC_APP_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 []))
|
|
|
|
click.echo("Server running on:\n")
|
|
for address in addresses:
|
|
click.echo(
|
|
f"{TCOLOR.OKGREEN}http://{address}:{port}{TCOLOR.ENDC}"
|
|
)
|
|
|
|
click.echo("")
|
|
click.echo(f"{TCOLOR.YELLOW}Data folder: {Paths.get_app_dir()}{TCOLOR.ENDC}\n")
|