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

MP3 parser: Ignore ID3 tags with empty values #162

Conversation

fabioperrella
Copy link
Contributor

@fabioperrella fabioperrella commented Sep 4, 2020

When I worked in #161 I noticed that the method TagWrapper#to_h does not ignore empty strings and because of that, it can replace a id3v1tag by a empty id3v2 tag, so I added a condition to skip for empty values.

Example before this change:

v1tag.genre = 'Rock'
v2tag.genre = ''

result: ""

Example after this change:

v1tag.genre = 'Rock'
v2tag.genre = ''

result: "Rock"

The mp3 used as a fixture was created by me. I used the tool id3ed (brew install id3ed) to edit the id3v1 tags

Copy link
Contributor

@julik julik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find 🔥

@julik julik changed the title Ignores mp3 tags with empty values MP3 parser: Ignore ID3 tags with empty values Sep 4, 2020
@julik julik merged commit dab0c5c into fix-mp3-to-not-raise-when-one-tag-is-invalid Sep 7, 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

Successfully merging this pull request may close these issues.

3 participants