Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should all tag values be lists? #23

Open
thebigmunch opened this issue Feb 26, 2020 · 5 comments
Open

Should all tag values be lists? #23

thebigmunch opened this issue Feb 26, 2020 · 5 comments

Comments

@thebigmunch
Copy link
Owner

thebigmunch commented Feb 26, 2020

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.

@thebigmunch
Copy link
Owner Author

As another point of reference, many tag editors don't allow users to set multiple values for most multi-value fields.

@thebigmunch
Copy link
Owner Author

In #16, I propose a refactor related to tags. It relieves some of the disadvantage of having all tag fields be lists (in the refactor proposal, a TagList).

But the question remains open for thoughts, opinions, and ideas.

@thebigmunch thebigmunch pinned this issue Mar 10, 2020
@thebigmunch
Copy link
Owner Author

thebigmunch commented Mar 12, 2020

After #16 (comment), I'm pretty sure that not everything should be lists. Not just because it makes more sense intellectually, but also because it makes more sense for implementation.

Whether we stick to a style guide (existing or newly created) for the appropriate formats remains to be seen. It's unlikely that many of the obvious single-value feilds (track number, album, copyright, etc) would occur multiple times in say, Vorbis comments, but it wouldn't be right to just ignore multiples (without warnings, at least).

@JuniorJPDJ
Copy link

I'd go with internal implementation as list and some sort of user-friendly overlay with list of multiple-values-accepting tags.

@thebigmunch
Copy link
Owner Author

thebigmunch commented Oct 11, 2020

I'd go with internal implementation as list and some sort of user-friendly overlay with list of multiple-values-accepting tags.

I honestly have no idea what you mean by this. Could you give a more detailed idea/example of what you mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants