+
+

+
Working...
diff --git a/internal/web/templates/scene_detail.html b/internal/web/templates/scene_detail.html
index e131742..3da8ce4 100644
--- a/internal/web/templates/scene_detail.html
+++ b/internal/web/templates/scene_detail.html
@@ -106,8 +106,8 @@
{{end}}
{{if .Scene.URL}}
{{end}}
diff --git a/scripts/config/api_keys.json b/scripts/config/api_keys.json
new file mode 100644
index 0000000..8ee5be5
--- /dev/null
+++ b/scripts/config/api_keys.json
@@ -0,0 +1,6 @@
+{
+ "tpdb_api_key": "Dn8q3mdZd7mE4OHUqf7k1A3q813i48t7q1418zv87c477738",
+ "ae_api_key": "",
+ "stashdb_api_key": "",
+ "stashdb_endpoint": "https://stashdb.org/graphql"
+}
\ No newline at end of file
diff --git a/scripts/enrich.sh b/scripts/enrich.sh
new file mode 100644
index 0000000..7f8719c
--- /dev/null
+++ b/scripts/enrich.sh
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+# Enrichment helper (Adult Empire enricher)
+# Usage:
+# ./scripts/enrich.sh all
+# ./scripts/enrich.sh performers
+# ./scripts/enrich.sh scenes
+# Optional flags are passed through after the subcommand, e.g.:
+# ./scripts/enrich.sh performers --start-id 100 --limit 50
+
+set -euo pipefail
+
+cmd="${1:-}"
+shift || true
+
+repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+
+run() {
+ echo "▶ $*"
+ if [[ -x "$repo_root/goondex" ]]; then
+ exec "$repo_root/goondex" "$@"
+ elif [[ -x "$repo_root/bin/goondex" ]]; then
+ exec "$repo_root/bin/goondex" "$@"
+ else
+ echo "goondex binary not found. Build it first with: go build -o bin/goondex ./cmd/goondex" >&2
+ exit 1
+ fi
+}
+
+case "$cmd" in
+ all)
+ run enrich all-performers "$@"
+ ;;
+ performers|performer)
+ run enrich all-performers "$@"
+ ;;
+ scenes|scene)
+ run enrich all-scenes "$@"
+ ;;
+ *)
+ cat <<'EOF' >&2
+Usage: ./scripts/enrich.sh {all|performers|scenes} [flags]
+
+Examples:
+ ./scripts/enrich.sh all
+ ./scripts/enrich.sh performers --start-id 100 --limit 50
+ ./scripts/enrich.sh scenes --start-id 200
+EOF
+ exit 1
+ ;;
+esac
diff --git a/scripts/run.sh b/scripts/run.sh
index 00208c0..859309a 100755
--- a/scripts/run.sh
+++ b/scripts/run.sh
@@ -6,6 +6,16 @@ source "$ROOT/scripts/env.sh"
ADDR="${ADDR:-localhost:8788}"
+# Auto-stop if already running on the same port
+if command -v lsof >/dev/null 2>&1; then
+ pids=$(lsof -t -i "@${ADDR#*:}:${ADDR##*:}" 2>/dev/null)
+ if [[ -n "$pids" ]]; then
+ echo "Stopping existing goondex on $ADDR (pids: $pids)"
+ kill $pids 2>/dev/null || true
+ sleep 0.5
+ fi
+fi
+
# Build if missing
if [[ ! -x "$ROOT/bin/goondex" ]]; then
echo "Binary not found; building first..."
diff --git a/scripts/set_api_key.sh b/scripts/set_api_key.sh
new file mode 100755
index 0000000..30d1e03
--- /dev/null
+++ b/scripts/set_api_key.sh
@@ -0,0 +1,48 @@
+#!/usr/bin/env bash
+# Persist TPDB (and optional AE/Stash) API keys to config/api_keys.json
+# Usage:
+# ./scripts/set_api_key.sh