thebigmunch / audio-metadata

A library for reading and, in the future, writing audio metadata. https://audio-metadata.readthedocs.io/
https://forum.thebigmunch.me
MIT License
53 stars 11 forks source link

Refactor tag classes/structure #16

Open thebigmunch opened 4 years ago

thebigmunch commented 4 years ago

This includes:

thebigmunch commented 4 years ago

So, after going down the rabbit hole of making everything in the Tags subclasses be a TagList, it really falls apart with ID3v2. It was some dark magic to begin with, but not so bad. But then having to support single-value frames, multiple-value frames, as well as multiple-occurrence frames, it got horrific.

But if instead we switch to not everything being a list, single-value and multiple-value can be handled inside the Tags subclass just fine. Meanwhile, multiple occurrence frames can be handled by a TagList different from the previously mentioned that presents an interface that can be handled the same way as a Tag in the ``Tags subclass.