mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-06 19:25:34 +00:00

+ hide some progressbars + rewrite telemetry into a class + remove obsolete start info logs + update contributing.md to include contributing.md + send posthog event in a bg thread + related side effects
32 lines
833 B
Python
32 lines
833 B
Python
import os
|
|
|
|
from app.settings import FLASKVARS, TCOLOR, Paths, Release
|
|
from app.utils.network import get_ip
|
|
|
|
|
|
def log_startup_info():
|
|
lines = "------------------------------"
|
|
# clears terminal 👇
|
|
os.system("cls" if os.name == "nt" else "echo -e \\\\033c")
|
|
|
|
print(lines)
|
|
print(f"{TCOLOR.HEADER}SwingMusic {Release.APP_VERSION} {TCOLOR.ENDC}")
|
|
|
|
adresses = [FLASKVARS.get_flask_host()]
|
|
|
|
if FLASKVARS.get_flask_host() == "0.0.0.0":
|
|
adresses = ["localhost", get_ip()]
|
|
|
|
print("Started app on:")
|
|
for address in adresses:
|
|
# noinspection HttpUrlsUsage
|
|
print(
|
|
f"➤ {TCOLOR.OKGREEN}http://{address}:{FLASKVARS.get_flask_port()}{TCOLOR.ENDC}"
|
|
)
|
|
|
|
print(lines+"\n")
|
|
|
|
print(f"{TCOLOR.YELLOW}Data folder: {Paths.get_app_dir()}{TCOLOR.ENDC}")
|
|
|
|
print("\n")
|