This article is Part 2 of a 10-part series exploring the Kodi multi-media player's music file scanning and metadata scraping processes via logic flow diagrams.
Searching for general information on managing your Kodi music library and serving content? See the official Kodi Wiki.
Discovering Compilations (Part 1)
In Phase 1, after the initial scan all tracks were grouped by album name. Now, in Phase 2 the albums are examined one-by-one to determine if they should be marked as a compilation. A compilation is a general term used to refer to a music release made of up of songs not intended to be viewed as a single work. There are two (2) types: Various Artist compilations and Anthologies.
Various Artist compilations consist of multiple independent works of art performed by different artists and released on the same album. Anthologies are compilations of multiple works of art by either a single performaing artist or a group of performing artists where the same artist or group is responsible for all tracks on the release.

The next article is Phase 3: Common Album Artist Determination