@echo off
REM WLED Screen Controller Restart Script
REM This script restarts the WLED screen controller server

echo Restarting WLED Screen Controller...
echo.

REM Stop the server first
echo [1/2] Stopping server...
call "%~dp0\stop-server.bat"

REM Wait a moment
timeout /t 2 /nobreak >nul

REM Change to parent directory (server root)
cd /d "%~dp0\.."

REM Start the server
echo.
echo [2/2] Starting server...
python -m wled_controller

REM If the server exits, pause to show any error messages
pause
