feat(core): add MusicBrainz orchestration methods to QbzCore
Adds qbz-integrations as a dependency of qbz-core and embeds a MusicBrainzClient on the QbzCore struct (initialized in new()). The client's own enabled flag governs whether requests fire; calls return the integration-layer ServiceUnavailable error when disabled. New methods on QbzCore<A>: musicbrainz_is_enabled() musicbrainz_set_enabled(enabled) musicbrainz_resolve_artist(name) -> Option<ResolvedArtist> musicbrainz_get_artist_metadata(mbid) -> ArtistMetadata musicbrainz_get_artist_relationships(mbid) -> ArtistRelationships The metadata method calls location::extract_metadata on the full artist response and then resolves the real country from the begin_area hierarchy when a city-level location was found (MB's "country" field is where the artist is currently active, not where they were born/formed). The relationships method splits relations into members / past_members / groups / collaborators by relation_type and direction, mirroring v2_musicbrainz_get_artist_relationships exactly. No cache wiring yet — every call hits the network. A cache wrapper can be plugged in later via a setter without changing the method signatures. cc
This commit is contained in:
4 files changed
+136
No files matched your search
Generated
+1
@@ -5118,6 +5118,7 @@ dependencies = [
|
||||
"async-trait",
|
||||
"log",
|
||||
"qbz-audio",
|
||||
"qbz-integrations",
|
||||
"qbz-models",
|
||||
"qbz-player",
|
||||
"qbz-qobuz",
|
||||
|
||||
Reference in new issue
Block a user