How does Music Assistant fetch the metadata for my music? #543
Replies: 6 comments 27 replies
-
Thanks for that detailed info @marcelveldt I would just like to show this example where it does not seem to align with what you have written above about matching albums. This isn't a problem for me as I am not seeing lots of duplicate entries but I just wanted to highlight it in case it is not your desired behaviour. In this first image I have selected ARTISTS>>ABBA. I only have one CD on my NAS which is called The Definitive Collection https://musicbrainz.org/release-group/e2996feb-86b9-3550-88ec-f1c9c9af3961 As far as I can tell this Album is NOT on Spotify. However you can see some but not all tracks have matched: |
Beta Was this translation helpful? Give feedback.
-
Yes it does and I’m happy with that as it removes duplicates. I guess I am just wondering if it is an issue that some but not all tracks matched? And whether those two entries that look like a case mismatch is worth fixing or able to be fixed! |
Beta Was this translation helpful? Give feedback.
-
I’ve seen that before but now I am seeing SHOW INFO not REFRESH ITEM? Edit. Actually found it top right. So that seems to refresh the artist. Don’t think I can just refresh a track |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
My YouTube music doesn't display the metadata or artwork. My entire flac library is what I've uploaded and it has properly embedded metadata and art that is recognized in the YouTube interface fine. When playing through MA is only shows the song title on my Google displays. How can I correct this? |
Beta Was this translation helpful? Give feedback.
-
Hello Marcel, I have a question about duo released albums. I tried to implement the 'albumartist' tag as : "duo name; artist1; artist2" I have 3 different artist folders on the share: "Miss Kittin", "Golden Boy", "Golden Boy with Miss Kittin". For the folder "Golden Boy with Miss Kittin / Or" i can put the album metadata. In Picard I change tags like below: I already tried several solutions but in the end some metadata gets messed up. Any suggetions? |
Beta Was this translation helpful? Give feedback.
-
If you have local musicfiles (e.g. mp3 or flac files) it is very important that the ID3 tags are correct on your music files. Based on these tags, your music will be loaded into Music Assistant with the correct name, metadata etc.
You can use an ID3 tag editor such as MusicBrainz Picard to correct/set the tags on your music files.
For online music sources (e.g. Spotify) the metadata are retrieved from the music provider(s) itself.
Basic metadata
title: read from "title" ID3 tag, fallback to filename if the tag is missing.
version: parsed from the title. For example "My great song (live version)" will be parsed as title "My great song" and version "live"
track artist(s): The Track artist(s) will be read from "artist" ID3 tag. Multiple artists are allowed in that field by a few common separators (e.g. semicolon). If no artist ID3 tag is present, it will try to parse it from the filename (e.g. artist - title.mp3).
album title: The album title will be read from the "album" ID3 tag. A track will NOT be assigned to any album if the album tag is missing. Just like the track title, the version of the album will be parsed from the title.
album artist: The Album artist(s) will be read from the "albumartist" ID3 tag. Just like regular track artist(s), this accepts multiple artists with the common separators. If the albumartist ID3 tag is missing, the whole album will be assigned to "Various Artists.
Album type: If there are 5 tracks or less within an album, the albumtype will be parsed as "single". If most/all tracks of the album have different artists, the album version will be set to "compilation". In all other cases the type will be set to just "album".
isrc: will be read from ID3 tags if present. ISRC is used to match tracks on streaming providers. If no ISRC present we fallback to exact name matching. Having ISRC on the ID3 tracks saves a lot of comparing and thus is faster. I recommend to have it when you have streaming providers and files (but things will work without).
disc and track number: will be read from ID3 tags if present.
some other metadata will be read too from the ID3 tags if present, such as lyrics, genre(s) and copyright. In fact all tags that are supported by the "Tinytag" python library used under the hood.
Images and additional metadata
If the musicfile contains an embedded image, that is preferred as main image and copied over to the album as fallback.
If the music is stored as "AlbumArtist\Album\song.ext" file structure, we will look for additional metadata there.
If we did not find additional metadata stored within folders or the source is a streaming provider, we will fetch the additional metadata from online sources such as fanrt.tv and the audiodb. To not stress those providers with useless requests we only fetch the metadata in a lazy manner. Only when view the details of an artist or album or when you play one of the tracks, this metadata will be fetched. This means that when you do not have local metadata you will slowly get this metadata filled into the db.
If there is an Artist folder found, we check for images there, like fanart(s), logos etc. If there is an artist.nfo file found, we grab the additional metadata from there. We follow the pattern from Kodi here
If there is an AlbumArtist folder found, we check for images there, like cover(s), discart etc. If there is an album.nfo file found, we grab the additional metadata from there. We follow the pattern from Kodi here
We do not (yet) store any online fetched metadata into the folders on disk but this might be something for a future release to add (with a toggle to enable it).
Matching Artist/Album/Song on multiple providers
If you use MA with multiple music providers we match the same items on multiple providers. We do this by strict matching.
For each track we store a reference for each quality. You can have the same song but with different qualities. For example losless FLAC file on disk but compressed ogg vorbis on a streaming provider. When playback is requested of a song, we always sort by quality and availability meaning we prefer the highest quality.
matching artists
matching albums
matching tracks
Correcting changes
If you've spotted some errors in the metadata from your files, e.g. an album attached to the wrong artist, you can correct the issue with a ID3 tag editor. This change will be picked up by MA on the next sync interval.
Sync of library
MA syncs the library items of the streaming providers and the files on disk to the database. The first time this sync runs this takes a lot of time (depending on hardware and collection size) because MA has to read all tags from the files which is slow. This is one time only. Once the first sync is completed, MA switches to delta syncs which only take seconds. If teh initial sync gets aborted somehow by accident, the sync will continue where it left off.
The MA (delta) sync runs every 3 hours. This is a very fast sync because only items with a changed checksum are processed. For the filesystem provider this means that the timestamp changed. The delta sync
You can trigger a manual sync by simply reloading the integration or HA. Besides that you can trigger a manual sync within the library view (e.g. Artists) and click the menu button on the top right (the 3 dots).
It is not possible to force a full sync / rescan but that should not be needed in normal circumstances.
If things are really wrong and you need to start over, you can remove the integration and re-add it, which will wipe the database. Only do that as a last resort because you will loose all metadata in the database including playcounts and normalization data.
Beta Was this translation helpful? Give feedback.
All reactions