ref: 244d6dbe34069fb8f8c4cc61e5c4725537f0cfd6
parent: 8674e9017cadc0a9f776de10940fc4cce03bd903
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Mar 10 17:45:36 EDT 2024
separate "album artist" key
--- a/examples/readtags.c
+++ b/examples/readtags.c
@@ -13,6 +13,7 @@
static const char *t2s[] = {
[Talbum] = "album",
+ [Talbumartist] = "albumartist",
[Talbumgain] = "albumgain",
[Talbumpeak] = "albumpeak",
[Tartist] = "artist",
--- a/id3v2.c
+++ b/id3v2.c
@@ -19,8 +19,10 @@
k++;
if(strcmp(k, "AL") == 0 || strcmp(k, "ALB") == 0)
txtcb(ctx, Talbum, k-1, v);
- else if(strcmp(k, "PE1") == 0 || strcmp(k, "PE2") == 0 || strcmp(k, "P1") == 0 || strcmp(k, "P2") == 0)
+ else if(strcmp(k, "PE1") == 0 || strcmp(k, "P1") == 0)
txtcb(ctx, Tartist, k-1, v);
+ else if(strcmp(k, "PE2") == 0 || strcmp(k, "P2") == 0)
+ txtcb(ctx, Talbumartist, k-1, v);
else if(strcmp(k, "IT2") == 0 || strcmp(k, "T2") == 0)
txtcb(ctx, Ttitle, k-1, v);
else if(strcmp(k, "YE") == 0 || strcmp(k, "YER") == 0 || strcmp(k, "DRC") == 0)
--- a/m4a.c
+++ b/m4a.c
@@ -89,6 +89,8 @@
type = Talbum;
else if(memcmp(d, "\251ART", 4) == 0)
type = Tartist;
+ else if(memcmp(d, "aART", 4) == 0)
+ type = Talbumartist;
else if(memcmp(d, "\251gen", 4) == 0 || memcmp(d, "gnre", 4) == 0)
type = Tgenre;
else if(memcmp(d, "\251day", 4) == 0)
--- a/tags.h
+++ b/tags.h
@@ -23,6 +23,7 @@
Timage,
Tcomposer,
Tcomment,
+ Talbumartist,
};
/* GAIN note:
--- a/vorbis.c
+++ b/vorbis.c
@@ -8,7 +8,9 @@
char *s;
int type;
}t[] = {
+ {"album artist", Talbumartist}, // some legacy leftovers
{"album", Talbum},
+ {"albumartist", Talbumartist},
{"artist", Tartist},
{"comment", Tcomment},
{"composer", Tcomposer},