thebigmunch/audio-metadata

Should all tag values be lists?

Open

#23 opened on Feb 26, 2020

 (5 comments) (1 reaction) (0 assignees)Python (13 forks)github user discovery
designdiscussionhelp wanted

Repository metrics

Stars
 (60 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

So, the reason this is the case now in audio-metadata, mutagen, and many, if not most, other audio metadata libraries is that Vorbis comment fields and some ID3 fields support/make sense with multiple values. But, some ID3 fields and other tag systems (like MP4, RIFF, and others) do not. Some people have even suggested in style guides that some Vorbis comment fields should not be given multiple times, as they don't make sense as multiple-value fields.

Making these lists has some advantages, mainly keeping the API consistent across all tag formats and fields. However, there are some disadvantages:

  • It's harder/uglier to abstract in the code. This can also make it harder/uglier for advanced usage.
  • It's some extra trouble/confusion for users to get information from what should be single value fields.
  • It can make users think single-value fields actually support multiple values.

So, the question is whether the API consistency is worth all the other hassles. Or vice versa.

Contributor guide