diff --git a/launch_qt.sh b/launch_qt.sh index 0af9cef..a13d378 100755 --- a/launch_qt.sh +++ b/launch_qt.sh @@ -101,10 +101,6 @@ if [ $MISSING_DEPS -eq 1 ]; then echo "✅ Dependencies installed successfully!" fi -# Check if Flask server is running -echo "" -echo "Checking Flask server..." - # Try to read server URL from settings SERVER_URL="http://localhost:5000" SETTINGS_FILE="$HOME/.techdj_settings.json" @@ -125,25 +121,23 @@ if [ -f "$SETTINGS_FILE" ]; then fi fi +# Check if Flask server is running echo "Checking server at: $SERVER_URL" -if curl -s --max-time 5 "${SERVER_URL}/library.json" > /dev/null 2>&1; then +if curl -s --max-time 2 "${SERVER_URL}/library.json" > /dev/null 2>&1; then echo "✅ Flask server is running at $SERVER_URL" else echo "⚠️ Flask server not detected at $SERVER_URL" - echo "Please make sure the server is running." - echo "" - echo "For local server:" - echo " python3 server.py" - echo "" - echo "For remote server:" - echo " Make sure server.py is running on the remote machine" - echo " and the URL in Settings (⚙️) is correct." - echo "" - read -p "Continue anyway? (y/n) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - exit 1 + if [[ "$*" == *"--noint"* ]]; then + echo "Proceeding in non-interactive mode..." + else + echo "Please make sure the server is running." + echo "" + read -p "Continue anyway? (y/n) " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + exit 1 + fi fi fi