Only consider an album “compiled” if albumartist != artist

This commit is contained in:
Phan An 2017-12-02 17:22:20 +01:00
parent d949ea9e60
commit 4246bcb45c

View file

@ -180,9 +180,9 @@ class File
// A "compilation" property can be determined by: // A "compilation" property can be determined by:
// - "part_of_a_compilation" tag (used by iTunes), or // - "part_of_a_compilation" tag (used by iTunes), or
// - "albumartist" (used by non-retarded applications). // - "albumartist" (used by non-retarded applications).
$props['compilation'] = (bool) ( // Also, the latter is only valid if the value is NOT the same as "artist".
array_get($comments, 'part_of_a_compilation', [false])[0] || $props['albumartist'] $props['compilation'] = array_get($comments, 'part_of_a_compilation', [false])[0]
); || ($props['albumartist'] && $props['artist'] !== $props['albumartist']);
return $props; return $props;
} }