ID3: Accept iTunes ID3 frames with space padded ID3v2.2 ID (#1403) (#1404)

iTunes 12 writes ID3v2.2 three-character sort frames (TSA, TSP, TST,
TS2, TSC) inside ID3v2.3 tags, padded to four bytes with 0x20 (space)
rather than 0x00, which is tolerated by '#ifndef NO_ITUNES_HACKS'
code. Enhance that code to also tolerate padding with a space.
This commit is contained in:
Urs Fleisch
2026-08-09 17:52:33 +02:00
committed by GitHub
parent 8e6fdb4295
commit d6b32d8a1d
+1 -1
View File
@@ -150,7 +150,7 @@ std::pair<Frame::Header *, bool> FrameFactory::prepareFrameHeader(
}
#ifndef NO_ITUNES_HACKS
if(version == 3 && frameID[3] == '\0') {
if(version == 3 && (frameID[3] == '\0' || frameID[3] == ' ')) {
// iTunes v2.3 tags store v2.2 frames - convert now
frameID = frameID.mid(0, 3);
header->setFrameID(frameID);