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

There is a bug in handling duplicates in your package. #42

Closed
AlexisWilke opened this issue Sep 27, 2019 · 2 comments
Closed

There is a bug in handling duplicates in your package. #42

AlexisWilke opened this issue Sep 27, 2019 · 2 comments

Comments

@AlexisWilke
Copy link

As I was writing a test, I noticed that in most cases you keep the first instance of a tag. All the others will be ignored.

I did not test all the tags or look at your code, but some tags can and are even expected to be duplicated.

Specifically, the TXXX tag has to be distinguished from its label and not the tag itself.

You add tag function works:

id3Tag.AddUserDefinedTextFrame(someFrame)

since it adds a new tag. However, it works the other way around: it accepts new entries which are potentially duplicates.

So... if you find two entries that looks like:

TXXX <size> <flags> 3 <name> \0 <data>

and the <name> are different, keep both in the order they were added. If the user calls AddUserDefinedText(). The reading of the tags should probably make use of the same add functions so that way you do not have to repeat that logic everywhere.

Documentation: http://id3.org/id3v2.3.0#User_defined_text_information_frame

@n10v
Copy link
Owner

n10v commented Feb 12, 2020

This can be fixed in 4de0eaa. Please check

@n10v n10v closed this as completed in 0a57fbf Feb 12, 2020
@n10v
Copy link
Owner

n10v commented Feb 12, 2020

Added tests for it: 0a57fbf#diff-e205654706d74dd8d206fc612c290191R77. Thank you for bug report!

n10v added a commit that referenced this issue Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants