CMRT 21: Worker: Retrieve all four MBID fields from AcoustID in one request - #27
Open
Swarnadip-Kar wants to merge 3 commits into
Open
CMRT 21: Worker: Retrieve all four MBID fields from AcoustID in one request#27Swarnadip-Kar wants to merge 3 commits into
Swarnadip-Kar wants to merge 3 commits into
Conversation
Coverage Report for CI Build 27123028384Coverage decreased (-0.007%) to 30.459%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
This was referenced Jun 8, 2026
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the three hardcoded QString() placeholders in acoustidResultReady
and the "requires a separate MusicBrainz call" TODO. All four MBID fields
now come from the single AcoustID /v2/lookup response with no extra
network calls.
Changes
acoustidworker.h
All default to QString(). Comments document the JSON path each
field is extracted from.
acoustidworker.cpp — doLookup()
after it descends into recordings[0].releases[0] for releaseId and
artistId, and into releases[0].mediums[0].tracks[0] for trackId.
Every array level is guarded with isEmpty() — the API omits arrays
entirely when empty rather than returning [].
acoustidworker.cpp — processJob() Step 5a
cache hits also carry the release field for audio-duplicate tracks.
result.releaseId, result.trackId, result.artistId.
Notes for reviewers
mediums, tracks) is required. The AcoustID API contract omits arrays
entirely when they are empty — a missing key returns QJsonValue::Undefined
and .toArray() returns an empty QJsonArray, which isEmpty() catches.
Skipping any guard would crash on tracks with partial metadata coverage.
are used — consistent with how we already take the first recording UUID
for the recording ID.
AcoustIdCacheEntry.musicbrainzReleaseId was already nullable (empty
string maps to NULL in the schema from day one).
Depends on: cmrt-feature-fingerprint-clear-reanalyze (#26 )