Use strcasecmp to check for replaygain id3v2 tags, since apparently some apps write them in all caps.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4672 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
87327cb931
commit
25555cd1b0
@ -251,16 +251,16 @@ static ReplayGainInfo *parseId3ReplayGainInfo(struct id3_tag *tag)
|
|||||||
id3_ucs4_latin1duplicate(id3_field_getstring
|
id3_ucs4_latin1duplicate(id3_field_getstring
|
||||||
(&frame->fields[2]));
|
(&frame->fields[2]));
|
||||||
|
|
||||||
if (strcmp(key, "replaygain_track_gain") == 0) {
|
if (strcasecmp(key, "replaygain_track_gain") == 0) {
|
||||||
replayGainInfo->trackGain = atof(value);
|
replayGainInfo->trackGain = atof(value);
|
||||||
found = 1;
|
found = 1;
|
||||||
} else if (strcmp(key, "replaygain_album_gain") == 0) {
|
} else if (strcasecmp(key, "replaygain_album_gain") == 0) {
|
||||||
replayGainInfo->albumGain = atof(value);
|
replayGainInfo->albumGain = atof(value);
|
||||||
found = 1;
|
found = 1;
|
||||||
} else if (strcmp(key, "replaygain_track_peak") == 0) {
|
} else if (strcasecmp(key, "replaygain_track_peak") == 0) {
|
||||||
replayGainInfo->trackPeak = atof(value);
|
replayGainInfo->trackPeak = atof(value);
|
||||||
found = 1;
|
found = 1;
|
||||||
} else if (strcmp(key, "replaygain_album_peak") == 0) {
|
} else if (strcasecmp(key, "replaygain_album_peak") == 0) {
|
||||||
replayGainInfo->albumPeak = atof(value);
|
replayGainInfo->albumPeak = atof(value);
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user