- Added a
Settingshelper inapp/main.py:- Loads config from
/data/config.json(orAPP_CONFIG_PATH) and falls back to env vars. - Centralizes:
MAM_COOKIE,QB_URL,QB_USER,QB_PASS,DL_DIR,LIB_DIR,IMPORT_MODE,QB_INNER_DL_PREFIX,QB_PATH_MAP, etc.
- Loads config from
- Introduced explicit qB → app path mapping:
settings.QB_PATH_MAPis a list of(qb_prefix, app_prefix)pairs.- Populated from:
- JSON config key
QB_PATH_MAP(list of objects withqb_prefix/app_prefix), or - Env
QB_PATH_MAP="qb=/path;qb2=/path2", or - Fallback:
QB_INNER_DL_PREFIX→DL_DIR.
- JSON config key
do_importnow uses this mapping inmap_qb_path, with legacy Unraid heuristics left as secondary fallbacks.
- Added a first‑run setup wizard:
GET /servessetup.htmlifneeds_setup()(no cookie, no lib dir, or no path map) and setup is not disabled via env.GET /setupshows the wizard unlessDISABLE_SETUPis set (then it returns 404).POST /api/setupwrites/data/config.jsonand callssettings.reload().- UI files:
app/templates/setup.html,app/static/setup.js.
- Setup UX tweaks:
- Main page includes a “Setup / Configuration” button (hidden when
DISABLE_SETUPis enabled). - The setup page title links back to
/.
- Main page includes a “Setup / Configuration” button (hidden when
- Root‑level
AGENTS.mddocuments repo conventions and agent guidance.
- Local dev (no Docker), from
app/:uvicorn main:app --reload --host 0.0.0.0 --port 8080- Optionally set
APP_CONFIG_PATH=../dev-config.jsonto avoid writing into/data.
- Docker (on Unraid or similar):
- Update
.envfor mounts and ports, thendocker compose up -d. - First visit to
/on a fresh data directory should trigger the setup wizard (unlessDISABLE_SETUPis set).
- Update
- Build and tag image from repo root:
docker build -t ghcr.io/raygan/mam-audiofinder:0.6 -t ghcr.io/raygan/mam-audiofinder:latest .
- Login to GHCR (once per machine):
echo "$GHCR_PAT" | docker login ghcr.io -u raygan --password-stdin
- Push tags:
docker push ghcr.io/raygan/mam-audiofinder:0.6docker push ghcr.io/raygan/mam-audiofinder:latest
- Consumers update via:
docker compose pull && docker compose up -d
- Add a “Test qB connection” button on the setup page (hit
/api/v2/app/version). - Improve error messages when
map_qb_pathcannot resolve a path. - Add a minimal
pytestsuite that mocks MAM/qB and exercises/health,/search,/add,/qb/torrents, and/importusing a temp/datadirectory. - Investigate adding real time download status for recently added torrents
- Investigate displaying artwork. Available via MAM API?