summaryrefslogtreecommitdiff
path: root/start.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-02 09:46:52 +0300
committerPaul Buetow <paul@buetow.org>2026-05-02 09:46:52 +0300
commit5275a0a4cec129bc1ea66beab934bf472f7a7fd2 (patch)
treef86db43c092efc773df5d570cb17fd205718d930 /start.sh
parent95c6ce72bdf16ead39d0df1ee27b0474441fbe4f (diff)
switch sidebar hotkey to s, always rebuild/rescan in start.sh, bump sw.js cache
Diffstat (limited to 'start.sh')
-rwxr-xr-xstart.sh25
1 files changed, 7 insertions, 18 deletions
diff --git a/start.sh b/start.sh
index f218d32..4887f54 100755
--- a/start.sh
+++ b/start.sh
@@ -39,13 +39,6 @@ bootstrap_auth() {
-c "$COOKIE" > /dev/null 2>&1 || true
}
-needs_rescan() {
- # Returns 0 if DB is empty (needs rescan)
- count=$(curl -fs "${BASEURL}/api/sets" -b "$COOKIE" 2>&1 | \
- python3 -c 'import sys,json; d=json.load(sys.stdin); print(len(d))' 2>&1 || echo "0")
- [ "$count" = "0" ]
-}
-
case "${1:-run}" in
stop)
stop
@@ -63,11 +56,9 @@ esac
cd "$(dirname "$0")"
-# Build if needed
-if [ ! -x "$BINARY" ]; then
- echo "Building player binary..."
- go build -o player ./cmd/mediaplayer
-fi
+# Build unconditionally — this script is for development
+echo "Building player binary..."
+go build -o player ./cmd/mediaplayer
stop
@@ -88,18 +79,16 @@ sleep 2
bootstrap_auth
-if needs_rescan; then
- echo "Library empty -- triggering rescan..."
- curl -fs -X POST "${BASEURL}/api/admin/rescan" -b "$COOKIE" > /dev/null 2>&1 || true
- echo "Rescan running in background (check tail -f $LOGFILE)"
-fi
+echo "Library rescan starting..."
+curl -fs -X POST "${BASEURL}/api/admin/rescan" -b "$COOKIE" > /dev/null 2>&1 || true
+echo "Rescan running in background (check tail -f $LOGFILE)"
echo ""
echo "Ready. Open ${BASEURL} in your browser."
echo "Login: test / test123"
echo ""
echo "Quick tips:"
-echo " m -- show/hide sets sidebar"
+echo " s -- show/hide sets sidebar"
echo " t -- show/hide toolbar"
echo " / -- search"
echo " ? -- help"