feat(wizard): prompt for MusicBrainz/AcoustID contact email

Replace the hardcoded MUSICBRAINZ_USER_AGENT placeholder in env.template
with an optional MUSICBRAINZ_OWNER_EMAIL prompt in step_enrichment.
The backend now composes a valid User-Agent from app name + version +
this email (falling back to the project URL if left blank).
This commit is contained in:
Senko-san
2026-06-11 00:40:00 +03:00
parent 7da5c4a15e
commit 4108121984
6 changed files with 17 additions and 1 deletions
+9
View File
@@ -84,5 +84,14 @@ generate_env() {
} >>"$ENV_FILE"
fi
# -- MusicBrainz/AcoustID contact (required by their usage policy) ----
if [[ -n "${CFG_MUSICBRAINZ_OWNER_EMAIL:-}" ]]; then
{
echo ""
echo "# -- MusicBrainz/AcoustID contact ----------------------------------------"
echo "MUSICBRAINZ_OWNER_EMAIL=${CFG_MUSICBRAINZ_OWNER_EMAIL}"
} >>"$ENV_FILE"
fi
chmod 600 "$ENV_FILE"
}
+1
View File
@@ -132,3 +132,4 @@ v_port() { [[ "$1" =~ ^[0-9]+$ ]] && (($1 >= 1 && $1 <= 65535)) || { ui_warn
v_url() { [[ "$1" =~ ^https?:// ]] || { ui_warn "$(t invalid_input)"; return 1; }; }
v_redis() { [[ "$1" =~ ^rediss?:// ]] || { ui_warn "$(t invalid_input)"; return 1; }; }
v_domain() { [[ "$1" =~ ^[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ ]] || { ui_warn "$(t invalid_input)"; return 1; }; }
v_email_opt() { [[ -z "$1" || "$1" =~ ^[^[:space:]@]+@[^[:space:]@]+\.[a-zA-Z]{2,}$ ]] || { ui_warn "$(t invalid_input)"; return 1; }; }