Skip to content

Commit a4af5aa

Browse files
radioactivemanjlindgren90
authored andcommitted
audtag: Accept embedded lyrics in more cases. Closes: #1818
Some ID3v2 headers contain lyrics with the type "LYRICS". They were read successfully before but then disregarded. Add a special case for the lyrics field to prevent that. DEBUG ../src/libaudtag/id3/id3-common.cc:161 [id3_associate_memo]: Field lyrics: lang = XXX, type = LYRICS, value = ...
1 parent a7d7f9b commit a4af5aa

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/libaudtag/id3/id3-common.cc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,20 @@ void id3_associate_memo (Tuple & tuple, Tuple::Field field, const char * data, i
162162
Tuple::field_get_name (field), lang, (const char *) type,
163163
(const char *) value);
164164

165-
if (type && ! type[0] && value) /* blank type = actual comment */
166-
tuple.set_str (field, value);
165+
if (! value)
166+
return;
167+
168+
switch (field)
169+
{
170+
case Tuple::Field::Lyrics: /* type may be set to e.g. "LYRICS" */
171+
tuple.set_str (field, value);
172+
break;
173+
174+
default:
175+
if (type && ! type[0]) /* blank type = actual comment */
176+
tuple.set_str (field, value);
177+
break;
178+
}
167179
}
168180

169181
static bool decode_rva_block (const char * * _data, int * _size,

0 commit comments

Comments
 (0)