Skip to content

Instantly share code, notes, and snippets.

@orumin
Created February 6, 2020 14:23
Show Gist options
  • Save orumin/c2088d7b64e7fcb651787955f5a4aea9 to your computer and use it in GitHub Desktop.
Save orumin/c2088d7b64e7fcb651787955f5a4aea9 to your computer and use it in GitHub Desktop.
rockbox patch
diff --git a/lib/rbcodec/metadata/metadata_common.c b/lib/rbcodec/metadata/metadata_common.c
index b062c5282d..e2d7370248 100644
--- a/lib/rbcodec/metadata/metadata_common.c
+++ b/lib/rbcodec/metadata/metadata_common.c
@@ -348,17 +348,29 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
parse_replaygain(name, value, id3);
p = NULL;
}
+
+ /* MODIFIED!
+ * We will parse multiple value from vorbis comment, now!
+ *
+ * P.S. I don't know about APE tag ;-< */
/* Do not overwrite already available metadata. Especially when reading
* tags with e.g. multiple genres / artists. This way only the first
* of multiple entries is used, all following are dropped. */
- if (p!=NULL && *p==NULL)
+ if (p!=NULL && (*p==NULL || type==TAGTYPE_VORBIS))
{
len = strlen(value);
len = MIN(len, buf_remaining - 1);
len = MIN(len, ID3V2_MAX_ITEM_SIZE); /* Limit max. item size. */
- if (len > 0)
+ if (len > 0 && *p!=NULL)
+ {
+ strlcpy(buf-1, " / ", 4);
+ len++;
+ strlcpy(buf+2, value, len);
+ len+=3;
+ }
+ else if (len > 0 && *p==NULL)
{
len++;
strlcpy(buf, value, len);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment