-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Normal
-
Affects Version/s: None
-
Component/s: Tags & Metadata
-
None
When performing a metadata lookup on a cluster of already-tagged files, Picard does not use the barcode, catalog number, or date from the file tags.
This causes the lookup to fail to distinguish between different country/edition releases of the same album (same title, artist, and track count).
Steps to reproduce:
- Load files already tagged from a specific release (e.g. Black Sabbath "The Dio Years" DE edition, barcode 081227999247)
- Disable "Use MBIDs for lookups" in settings
- Cluster the files
- Click Lookup on the cluster
Expected: Picard identifies the correct release (DE edition) using the barcode from the file tags.
Actual: The search query contains only artist, album title, and track count. Multiple editions score identically, the result is flagged "ambiguous", and an arbitrary edition is loaded (e.g. the AU release).
Root cause: The Cluster class never aggregates barcode, catalog number, date, or label from its files into the cluster metadata. The lookup_metadata() method reads these from self.metadata which only contains album, albumartist, and totaltracks.
Fix: Aggregate consensus values from files before lookup. The barcode is then included in both the MB search query (narrowing results) and the release scoring (decisive identifier match).