From 4246bcb45c2671ad5375250b940936f244d50c1e Mon Sep 17 00:00:00 2001 From: Phan An Date: Sat, 2 Dec 2017 17:22:20 +0100 Subject: [PATCH] =?UTF-8?q?Only=20consider=20an=20album=20=E2=80=9Ccompile?= =?UTF-8?q?d=E2=80=9D=20if=20albumartist=20!=3D=20artist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/File.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/File.php b/app/Models/File.php index dc1f4485..ff5d7717 100644 --- a/app/Models/File.php +++ b/app/Models/File.php @@ -180,9 +180,9 @@ class File // A "compilation" property can be determined by: // - "part_of_a_compilation" tag (used by iTunes), or // - "albumartist" (used by non-retarded applications). - $props['compilation'] = (bool) ( - array_get($comments, 'part_of_a_compilation', [false])[0] || $props['albumartist'] - ); + // Also, the latter is only valid if the value is NOT the same as "artist". + $props['compilation'] = array_get($comments, 'part_of_a_compilation', [false])[0] + || ($props['albumartist'] && $props['artist'] !== $props['albumartist']); return $props; }