Skip to content

ID3v2.2 upgrade: TOA and TXT map onto already-occupied v2.4 ids (TOAL/TOLY), misfiling or dropping a frame #704

Closed

Description

@ExhibitJ

Summary

Two entries in the ID3v2.2 upgrade table map a frame to the wrong ID3v2.4 id, and each collides with a mapping that is already correct. The result is either a silently misfiled value or, when both frames of a pair are present, a frame that disappears.

TOA (Original artist) is upgraded to TOAL (Original album title), and TXT (Lyricist) is upgraded to TOLY (Original lyricist).

Still present on main as of 2026-08-27. Tested against 0.19.2.

The mappings

lofty/src/id3/v2/util/upgrade.rs:

"TOA" => "TOAL",
"TOT" => "TOAL",
"TXT" => "TOLY",
"TOL" => "TOLY",

lofty/src/tag/item.rs defines what those v2.4 ids mean:

"TOAL" => OriginalAlbumTitle,
"TOPE" => OriginalArtist,
"TOLY" => OriginalLyricist,
"TEXT" => Lyricist,

The two tables disagree with each other, independently of any outside reference: TOA/TOT both land on TOAL, and TXT/TOL both land on TOLY.

The ID3v2.2 spec (id3.org/id3v2-00) settles which member of each pair is the misrouted one:

Frame Spec wording Currently Suggested
TOA "Original artist(s)/performer(s)" TOAL TOPE
TOT "Original album/Movie/Show title" TOAL correct
TXT "Lyricist(s)/text writer(s)" TOLY TEXT
TOL "Original Lyricist(s)/text writer(s)" TOLY correct

Reproduction

ID3v2.2 tags written byte by byte (3-character frame id, 3-byte non-synchsafe size), then read back with lofty 0.19.2 and the items printed:

TOA alone   ->  OriginalAlbumTitle = Text("THE ORIGINAL ARTIST")
TXT alone   ->  OriginalLyricist   = Text("THE LYRICIST")
TOA + TOT   ->  OriginalAlbumTitle = Text("THE ORIGINAL ALBUM")      // TOA gone
TXT + TOL   ->  OriginalLyricist   = Text("THE ORIGINAL LYRICIST")   // TXT gone

Two behaviours:

  1. A frame alone is misfiled. The value survives, its meaning does not — an original artist is read back as an original album.
  2. Both frames of a pair, and one is lost. Only one item comes back rather than two, so this is not a last-write-wins overwrite but a dropped frame.

I can turn this into a test case in the repo's style if that is useful — happy to open a PR instead if you would prefer the fix directly.

Activity

  1. added this to the 0.25.2 milestone on Sep 1, 2026
  2. added
    bug
    on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions