sanket143 / id3

A cross platform dart package to extract meta data from mp3 files.
https://pub.dev/packages/id3/
MIT License
13 stars 6 forks source link

Migrated to null-safety #9

Closed 4-alok closed 3 years ago

4-alok commented 3 years ago

and Fixed frame size calculation by @moffatman

sanket143 commented 3 years ago

Hey, @4-alok and @moffatman thanks for contributing to this project.

Good stuff, it's giving full info but there seems to be one character more \u0000 at the end of each frame, not sure if that's a defect in the file but it didn't show up when reading metadata using ffmpeg so it could be in the code. Can you check if this is the case with you too or just with me this file?

You can debug the same by adding following on line 267;

    metaTags![tag] =
              _MP3FrameParser(frameContent).readString(terminator: false);
 +  print("${metaTags![tag]}: ${metaTags![tag].length}"); // the length will be one character more than the actual tag value

image Left: This MR, Right: 'master'

4-alok commented 3 years ago

I have no idea about this. I only migrated to null safety. I was able to retrieve metadata in mp3 files with this package, and it worked perfectly after the migration.

moffatman commented 3 years ago

I will take a look at this, I remember I wasn’t really satisfied yet, I didn’t open a PR myself. Also +1 for Ling tosite sigure 😁.

moffatman commented 3 years ago

@sanket143 I didn't see the issue, can you share that file?

moffatman commented 3 years ago

@sanket143 I was able to resolve that issue by reproducing it with your file. Let's merge these changes in https://github.com/sanket143/id3/pull/6, I included @4-alok's NNBD changes in my fork too.