Add 'Tdisc' to libtags

Uses 'TPOS' for id3v2 tags, and 'DISCNUMBER' for vorbis comments (mostly
just relevant to flacs for our use case).

Fixes #181.
This commit is contained in:
jacqueline
2025-01-29 16:05:56 +11:00
parent f9011839cd
commit ddcd06dbca
4 changed files with 6 additions and 0 deletions
+2
View File
@@ -68,6 +68,8 @@ v2cb(Tagctx *ctx, char *k, char *v)
return 0;
}else if(strcmp(k-1, "COM") == 0 || strcmp(k-1, "COMM") == 0){
txtcb(ctx, Tcomment, k-1, v);
}else if(strcmp(k, "POS") == 0){
txtcb(ctx, Tdisc, k-1, v);
}else if(strcmp(k, "XXX") == 0){
k = v;
v += strlen(v) + 1;
+1
View File
@@ -16,6 +16,7 @@ enum
Ttitle,
Tdate, /* "2014", "2015/02/01", but the year goes first */
Ttrack, /* "1", "01", "1/4", but the track number goes first */
Tdisc,
Talbumgain,
Talbumpeak,
Ttrackgain,
+1
View File
@@ -14,6 +14,7 @@ static const struct {
{"artists", Tmultiartists},
{"albumartist", Talbumartist},
{"tracknumber", Ttrack},
{"discnumber", Tdisc},
{"date", Tdate},
{"replaygain_track_peak", Ttrackpeak},
{"replaygain_track_gain", Ttrackgain},