Main objectives of the project are to retrieve cover art for music files and also some metadata tags from MusicBrainz Database. Now there are many MusicBrainz tags and identifiers which can be used to retrieve information from MusicBrainz Database, but we don’t need everything. Mainly, we need Album ID, Track ID, Recording ID and Artist ID. Names of these identifiers are self explanatory, like MusicBrainz Artist ID uniquely identifies an artist in the MusicBrainz database. So we are gonna deal with 4 MBIDs?
MusicBrainz Album ID is being deprecated in favour of MusicBrainz Release ID and MusicBrainz Release Group ID. So finally we’ve 5 MBIDs which we are gonna use to retrieve information from MusicBrainz Database. Now natural question arises, where do we get these MusicBrainz IDs for a file, now there are two cases:
A music file already has MusicBrainz IDs stored inside it:
In this case, all we need to do is extract those mbids and store them in tracker. Tracker is a file indexing and search framework, which GNOME Music relies on. Hence it’s necessary to extract and index mbids in tracker from file.
If a file doesn’t have MusicBrainz IDs:
In this case, first we need to retrieve MusicBrainz IDs based on AcoustID and store in tracker. Also through tracker writeback, we will write those mbids in the file also.
Once we have MusicBrainz IDs, we can write grilo plugins to retrieve cover art and tags.