/api/admin/system probed slskd with the shared client, whose 30s timeout is sized for searches and transfers. So the panel sat on skeletons for the full 30s exactly when slskd was unreachable -- the case you open it to diagnose -- and the 5s UI poll stacked requests behind it. Probes now get 4s: above a LAN round-trip, under the poll interval. httpx.ConnectTimeout also stringifies to "", so the banner rendered "slskd unreachable -- " with nothing after the dash. Fall back to the exception class name. Add dev.sh, because the documented dev commands could not work: MUSE_DB defaults to /config/muse.db which a Mac cannot write, and the auth preflight refuses to boot without a client ID. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
37 lines
1.4 KiB
Bash
Executable File
37 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run muse on this machine, against live Deezer, with no OAuth app and no slskd.
|
|
#
|
|
# ./dev.sh serve the built UI from web/out on :5041
|
|
# ./dev.sh --build rebuild web/out first (needed after any UI edit)
|
|
#
|
|
# For UI work with hot reload, leave this running and start `next dev` beside
|
|
# it -- see "Developing" in the README.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
[[ "${1:-}" == "--build" ]] && (cd web && npm install && npm run build)
|
|
|
|
if [[ ! -d .venv ]]; then
|
|
python3 -m venv .venv
|
|
.venv/bin/pip install -q -r requirements.txt
|
|
fi
|
|
|
|
mkdir -p dev/library dev/downloads
|
|
|
|
# Auth off, because the alternative is registering an OAuth app whose callback
|
|
# points at localhost. Every role check then reports admin, which is what makes
|
|
# the admin panel reachable here. The startup banner says this loudly; heed it.
|
|
export MUSE_AUTH="${MUSE_AUTH:-off}"
|
|
export MUSE_DB="${MUSE_DB:-dev/muse.db}"
|
|
export MUSE_LIBRARY_DIR="${MUSE_LIBRARY_DIR:-dev/library}"
|
|
export MUSE_DOWNLOAD_DIR="${MUSE_DOWNLOAD_DIR:-dev/downloads}"
|
|
export MUSE_COOKIE_SECURE=false
|
|
|
|
# Unset by default: with no slskd, requests queue and then fail at the search
|
|
# step, which is the correct behaviour and still exercises the whole UI path.
|
|
# Point these at a real instance to test acquisition end to end.
|
|
export SLSKD_URL="${SLSKD_URL:-http://127.0.0.1:5030}"
|
|
export SLSKD_API_KEY="${SLSKD_API_KEY:-}"
|
|
|
|
exec .venv/bin/uvicorn app:app --host 127.0.0.1 --port 5041 --reload
|