ID3v11Tag can't have empty track number field

Issue #142 resolved
Joakim Andersson created an issue

New ID3v11 tags have track number 0. After deleting the track number field, they still have track number 0. In other words, the following code yields 0 and 0. For any other field or tag, the field would be empty in both cases (AFAIK), so I'm assuming it's a bug.

ID3v11Tag tag = new ID3v11Tag();
System.out.println(tag.getFirst(FieldKey.TRACK));
tag.deleteField(FieldKey.TRACK);
System.out.println(tag.getFirst(FieldKey.TRACK));

Comments (5)

  1. IJabz repo owner

    What is the actual problem, tracknos start at one, so there is no difference between trackno 0 and no track no

  2. Joakim Andersson reporter

    Consistency. Files that have no track number should show the same value, regardless of whether they are mp3 or not. It's annoying and confusing if some have empty field and some have 0. I tag mp3 files with both ID3v1 and ID3v2, and many programs look at the ID3v1 tag when the ID3v2 tag has no value for that key, so they'll show 0 instead of nothing.

    Also, some people might want to actually use the 0 tag value in certain situations, to have a particular meaning separate from no value.

  3. Log in to comment