#6566 -- Further refine how tags are processed.

This commit is contained in:
Buster Neece 2023-09-04 10:47:28 -05:00
parent 769b9ab9ef
commit 27b62cfdc5
No known key found for this signature in database
1 changed files with 10 additions and 12 deletions

View File

@ -47,19 +47,17 @@ final class PhpReader
);
}
$toProcess = [
$info['comments'] ?? [],
];
// ID3v2 should always supersede ID3v1.
if (isset($info['tags']['id3v2'])) {
unset($info['tags']['id3v1']);
}
if (is_array($info['tags'])) {
// ID3v2 should always supersede ID3v1.
if (isset($info['tags']['id3v2'])) {
unset($info['tags']['id3v1']);
}
foreach ($info['tags'] as $tagSet) {
$toProcess[] = $tagSet;
}
if (!empty($info['tags'])) {
$toProcess = $info['tags'];
} else {
$toProcess = [
$info['comments'] ?? [],
];
}
$metaTags = $this->aggregateMetaTags($toProcess);