summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-25 14:50:36 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-25 14:50:36 +0200
commitbbc76ad4da3ca61f820b9605ec9228c7a9357352 (patch)
treee1295931bfdfcaa28174c247ff9dd37627022f9d /packaging
parentc52e85b984bffc78125aff744513bc5d33ad72b3 (diff)
downloadmeshbay-bbc76ad4da3ca61f820b9605ec9228c7a9357352.tar.gz
fix(node): fall back to a loose MusicBrainz query when the strict one finds nothing
search_release() only ever tried a field-scoped exact-phrase Lucene query (artist:"..." AND release:"..."). Verified live against musicbrainz.org: any deviation from MusicBrainz's own spelling (a year suffix, an edition tag, an artist credited under an older/aliased name) drops it to zero results outright rather than a low-scored one, so the confidence check never even ran — this is why well-recognized artists were still getting almost no cover art. Add an unscoped loose-query fallback, escape Lucene special characters in the interpolated tag text, and make the confidence score consider the artist match too (not just the album title) now that the fallback has no field scoping to rely on. Also document MESHBAY_MUSICBRAINZ_CONTACT_DEFAULT in the systemd units and man page, mirroring MESHBAY_TMDB_DEFAULT_TOKEN's precedent — never a literal value in source, configured via node.env. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013XSohfUQQiaE77qyFLgSv3
Diffstat (limited to 'packaging')
-rw-r--r--packaging/systemd/meshbay-node-user.service6
-rw-r--r--packaging/systemd/meshbay-node.service8
2 files changed, 13 insertions, 1 deletions
diff --git a/packaging/systemd/meshbay-node-user.service b/packaging/systemd/meshbay-node-user.service
index f476841..62ca4de 100644
--- a/packaging/systemd/meshbay-node-user.service
+++ b/packaging/systemd/meshbay-node-user.service
@@ -28,6 +28,12 @@ Type=simple
# MESHBAY_TMDB_DEFAULT_TOKEN (Videos app, optional) also lives here — never
# in source. Absent means TMDB lookups are inert until the operator sets one
# here or configures a custom token in Settings (docs/mediacenter.md §5.5).
+# MESHBAY_MUSICBRAINZ_CONTACT_DEFAULT (Music app, optional) lives here too,
+# same reasoning — not a credential (MusicBrainz needs none), but still
+# never a literal value in source: it's a personal contact address sent
+# as-is in every request's User-Agent (docs/musicbay.md §3.2). Absent means
+# MusicBrainz lookups are inert until the operator sets one here or
+# configures a contact in Settings.
EnvironmentFile=-%h/.config/meshbay/node.env
ExecStart=/usr/bin/meshbay-node --config %h/.config/meshbay/node.toml
diff --git a/packaging/systemd/meshbay-node.service b/packaging/systemd/meshbay-node.service
index a469484..5c4de6b 100644
--- a/packaging/systemd/meshbay-node.service
+++ b/packaging/systemd/meshbay-node.service
@@ -15,7 +15,13 @@ WorkingDirectory=%h
# Secrets: MESHBAY_PASSWORD (hub login), MESHBAY_UNLOCK_KEY (keystore),
# MESHBAY_TMDB_DEFAULT_TOKEN (Videos app — optional, no literal default
# ships in source; absent means TMDB lookups are inert until the operator
-# sets one here or configures a custom token in Settings, docs/mediacenter.md §5.5)
+# sets one here or configures a custom token in Settings, docs/mediacenter.md §5.5).
+# MESHBAY_MUSICBRAINZ_CONTACT_DEFAULT (Music app — optional, no literal
+# default ships in source either; not a credential, but still never a
+# literal value in git — it's a personal contact address sent as-is in
+# every MusicBrainz request's User-Agent, docs/musicbay.md §3.2). Absent
+# means MusicBrainz lookups are inert until the operator sets one here or
+# configures a contact in Settings.
EnvironmentFile=-%h/.config/meshbay/node.env
ExecStart=/usr/bin/meshbay-node --config %h/.config/meshbay/node.toml