Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1250

Picard sets TCON tag values incorrectly when using ID3v2.3

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 1.4.2, 2.0.4
    • Tags & Metadata
    • Debian Linux 9 (stretch) on amd64, Picard 1.4.2

      When picard is configured to save ID3v2.3 tags, it not only fails to set multi-value genre (TCON) tags correctly, it actually destructively modifies the pre-existing valid format of the TCON tag to an invalid (non-spec compliant) format.

      Nearly all v2.3 tags do not allow multiple values, however TCON is a specific exception to that. The v2.3 spec allows multiple values within TCON, and specifies that the values are separated using parentheses. So even if using a (by default for picard) semicolon-space separator for any other v2.3 tags is reasonable, it is not for TCON.

      In addition, picard seems to be totally ignoring (not using) numeric mappings for defined genres. While the use of numeric genre values is not specifically required by the spec, the spec does seems to suggest that the numeric mappings should be used when possible, and depending on your reading of it, it even kind of implies that numeric values may be required in order for the string to hold multiple values.

      Here's an example of an existing, valid multi-value v2.3 TCON tag:
      (137)(144)(12)Progressive Metal

      Here is what picard saves for TCON after processing that tag, even if no user-driven changes were made:
      Heavy Metal; Thrash Metal; Other; Progressive Metal.

      Admittedly, the spec only states how multiple numeric values are encoded, it does not clearly specify how multiple non-numeric values should be encoded. However one could extrapolate that multiple non-numerics are perfectly valid as long as they are separated by a numeric in parens, and does specify that the string value after the paren set is a refinement of the genre. The use of (12) (Other) seems logical to be used for this separator.

      So even though the spec doesn't clearly specify, one possibly valid representation of multiple non-numeric values that doesn't seem to be precluded by the spec would be:
      (12)GenreOne(12)GenreTwo

      So it seems like there are several problems that need to be fixed in picard with regard to v2.3 TCON frame handling:

      1. Picard should not be modifying tags that are not being set by data or by the user. In my case, I do NOT have folksonomy genre tags enabled, so TCON shouldn't be getting modified. And if the tag isn't being set to something specific, it should preserve the format and any numeric genres that were already there.
      2. If picard sets the TCON tag for v2.3, it SHOULD use numeric genres when possible.
      3. If picard sets multiple values for the TCON tag for v2.3, then it should either use an existing numeric mapping if one matches, or use (12) as a separator rather than the configured multi-value join string used for other v2.3 tags, since TCON is a special case that intrinsically allows multiple values when the paren separators are used.

            Unassigned Unassigned
            RoboTardis Robo Tardis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Version Package