diff --git a/server.py b/server.py index c6b0e22..28833b4 100644 --- a/server.py +++ b/server.py @@ -33,7 +33,7 @@ def log(message: str): f.write("") with open(log_path, "a") as f: - f.write(f"{datetime.now().isoformat()} - {message}\n") + f.write(f"{message}\n") print(f"{datetime.now().isoformat()} - {message}") # Also print to console for debugging def find(name, path): @@ -112,9 +112,9 @@ def restart(): # Start with a new process output = os.system(f"spotifyd -d '{SPEAKER_NAME}' --onevent {hookPath}") if output != 0: - log("Failed to restart spotifyd") + log("Failed to start spotifyd") else: - log("spotifyd restarted successfully") + log("Spotify started successfully") return redirect('/')