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

Refactor tag classes/structure #16

Open
1 of 2 tasks
thebigmunch opened this issue Feb 15, 2020 · 1 comment
Open
1 of 2 tasks

Refactor tag classes/structure #16

thebigmunch opened this issue Feb 15, 2020 · 1 comment

Comments

@thebigmunch
Copy link
Owner

thebigmunch commented Feb 15, 2020

This includes:

  • Create a Tag class.
    • Has attributes name and value.
    • Format-specific tag classes inherit from Tag.
    • All tag parsing logic moves to the appropriate tag classes.
  • Refactor Tags classes to support both plain values and Tag instances in some way.
@thebigmunch thebigmunch changed the title Assess/Revise Tags item hierarchy Refactor tag classes/structure Mar 4, 2020
@thebigmunch thebigmunch pinned this issue Mar 4, 2020
@thebigmunch
Copy link
Owner Author

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.

thebigmunch added a commit that referenced this issue Mar 14, 2020
thebigmunch added a commit that referenced this issue Mar 14, 2020
thebigmunch added a commit that referenced this issue Mar 14, 2020
thebigmunch added a commit that referenced this issue Mar 14, 2020
Added:

* ``ID3v1Field``
* ``ID3v1AlbumField``
* ``ID3v2ArtistField``
* ``ID3v1CommentField``
* ``ID3v1GenreField``
* ``ID3v1TitleField``
* ``ID3v1TrackNumberField``
* ``ID3v1YearField``
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

1 participant