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

Fixing a bug in id3tag when mapping ID3 tags to intrinsics #118

Open
julik opened this issue May 11, 2018 · 1 comment
Open

Fixing a bug in id3tag when mapping ID3 tags to intrinsics #118

julik opened this issue May 11, 2018 · 1 comment

Comments

@julik
Copy link
Contributor

julik commented May 11, 2018

With our fixtures id3tag raises an exception when addressing Tag#genre apparently.

 1) FormatParser::MP3Parser decodes and estimates duration for a CBR MP3
     Failure/Error: value = tag.public_send(k)
     
     NoMethodError:
       undefined method `gsub' for nil:NilClass
     # /Users/julik/Code/libs/id3tag/lib/id3tag/frames/v2/genre_frame/genre_parser_pre_24.rb:25:in `just_genres'
     # /Users/julik/Code/libs/id3tag/lib/id3tag/frames/v2/genre_frame/genre_parser_pre_24.rb:12:in `genres'
     # /Users/julik/Code/libs/id3tag/lib/id3tag/frames/v2/genre_frame.rb:23:in `get_genres'
     # /Users/julik/Code/libs/id3tag/lib/id3tag/frames/v2/genre_frame.rb:8:in `genres'

I've pushed a branch called id3tag-bug which demonstrates it. We need to find out why that happens, create a minimal test case and file a PR for https://github.com/krists/id3tag

The rescue nil clause in the MP3 parser code can then be removed.

@alex-quiterio
Copy link
Contributor

alex-quiterio commented Jun 13, 2018

Hello @julik,

After a small investigation around the gem id3tag the issue with the call on nil seems to be fixed by now. I will wait until a new tag is released in order to make it safe to remove the rescue nil. Yaay! 🎉 Always nice to clean up these edge cases from the code.

julik pushed a commit that referenced this issue Jun 18, 2018
…125)

The guard `rescue nil` can now be safely removed since the original issue
is fixed by krists/id3tag#19

related with: #118
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

3 participants