feat(wizard): optional AcoustID key step for metadata enrichment

Adds a wizard step (after the ML step) that prompts for an AcoustID API
key. Left blank, enrichment runs on embedded tags only; with a key the
backend also identifies untagged files by audio fingerprint (§1D). The
key is appended to .env.deploy and reaches both api and worker via
env_file. en/ru strings included.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Senko-san
2026-06-09 13:10:57 +03:00
parent d3839335e5
commit 7da5c4a15e
4 changed files with 27 additions and 0 deletions
+8
View File
@@ -37,6 +37,7 @@ CFG_HTTP_PORT="8080"; CFG_API_PORT="8080"; CFG_WEBUI_PORT="3000"
CFG_PUBLIC_API_BASE_URL="/api/v1"
CFG_ADMIN_CREATE="no"; CFG_ADMIN_USER=""; CFG_ADMIN_PASS=""
CFG_ML_URL=""
CFG_ACOUSTID_KEY=""
CFG_JWT_SECRET=""
# ==========================================================================
@@ -185,6 +186,12 @@ step_ml() {
ui_input "$(t ml_prompt)" "" ""; CFG_ML_URL="$UI_VALUE"
}
step_enrichment() {
ui_title "$(t step_enrichment)"
ui_dim "$(t enrichment_note)"
ui_input "$(t acoustid_prompt)" "" ""; CFG_ACOUSTID_KEY="$UI_VALUE"
}
access_url() {
if [[ "$CFG_WEBUI" == "yes" ]]; then
if [[ "$CFG_PROXY" == "yes" ]]; then
@@ -236,6 +243,7 @@ run_wizard() {
step_network
step_admin
step_ml
step_enrichment
gen_hex 32; CFG_JWT_SECRET="$SECRET"
+5
View File
@@ -99,6 +99,11 @@ MSG[admin_skip_note]="You can create an admin later with: make logs (see README)
MSG[step_ml]="Optional ML service"
MSG[ml_prompt]="ML service URL (leave blank — backend degrades gracefully)"
# -- enrichment / acoustid -------------------------------------------------
MSG[step_enrichment]="Metadata enrichment (optional)"
MSG[enrichment_note]="Imported files are auto-tagged from their embedded tags. Add an AcoustID key to also identify untagged files by audio fingerprint (free: https://acoustid.org/new-application)."
MSG[acoustid_prompt]="AcoustID API key (leave blank to use embedded tags only)"
# -- summary / run ---------------------------------------------------------
MSG[summary_title]="Summary (secrets hidden)"
MSG[summary_services]="Services"
+5
View File
@@ -99,6 +99,11 @@ MSG[admin_skip_note]="Администратора можно создать п
MSG[step_ml]="Опциональный ML-сервис"
MSG[ml_prompt]="URL ML-сервиса (оставьте пустым — backend деградирует штатно)"
# -- enrichment / acoustid -------------------------------------------------
MSG[step_enrichment]="Обогащение метаданных (опционально)"
MSG[enrichment_note]="Импортируемые файлы тегируются из встроенных тегов. Добавьте ключ AcoustID, чтобы опознавать файлы без тегов по аудио-отпечатку (бесплатно: https://acoustid.org/new-application)."
MSG[acoustid_prompt]="API-ключ AcoustID (пусто — только встроенные теги)"
# -- summary / run ---------------------------------------------------------
MSG[summary_title]="Сводка (секреты скрыты)"
MSG[summary_services]="Сервисы"
+9
View File
@@ -75,5 +75,14 @@ generate_env() {
} >>"$ENV_FILE"
fi
# -- optional AcoustID key (metadata enrichment §1D) ------------------
if [[ -n "${CFG_ACOUSTID_KEY:-}" ]]; then
{
echo ""
echo "# -- metadata enrichment (AcoustID) -------------------------------------"
echo "ACOUSTID_API_KEY=${CFG_ACOUSTID_KEY}"
} >>"$ENV_FILE"
fi
chmod 600 "$ENV_FILE"
}