Skip to content

Commit ac3ff4a

Browse files
authored
Ensure extra metadata for vorbiscomment is given as multi-line string instead of an array (AzuraCast#7917)
1 parent 6bfcae9 commit ac3ff4a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

backend/src/Media/Metadata/Writer.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ public function __invoke(WriteMetadata $event): void
4040
$tagwriter->tagformats = $tagFormats;
4141

4242
$writeTags = $metadata->getKnownTags();
43-
$writeTags['text'] = $metadata->getExtraTags();
43+
44+
// GetID3 requires all tags for vorbiscomment to have string values
45+
// so we explicitly need to convert the extra tags into a multiline string
46+
$writeTags['text'] = in_array('vorbiscomment', $tagFormats)
47+
? implode(PHP_EOL, $metadata->getExtraTags())
48+
: $metadata->getExtraTags();
4449

4550
$artContents = $metadata->getArtwork();
4651
if (null !== $artContents) {

0 commit comments

Comments
 (0)