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

getting null in trackName, trackArtistNames and all other data because folder name is 98º , so problem in folder name #37

Open
fvthakor opened this issue Nov 26, 2023 · 1 comment

Comments

@fvthakor
Copy link

Window 11 flutter app
When I trying metadata of mp3 with 98º folder name then I am getting this
98º folder results
{trackName: , trackArtistNames: [], albumName: , albumArt: , albumArtistName: , trackNumber: null, albumLength: null, year: 0, genre: null, authorName: null, writerName: , discNumber: null, mimeType: null, trackDuration: 0, bitrate: 0, filePath: D:\test_test\98º\Baarish Hai Jaanam - Stebin Ben 320 Kbps.mp3}

When I trying metadata of mp3 with other folder name then I am getting this
other folder results

{trackName: Baarish Hai Jaanam - Stebin Ben, trackArtistNames: [Payal Dev, Stebin Ben, Raj Shekhar], albumName: Baarish Hai Jaanam - Stebin Ben, albumArt: Uint8List, albumArtistName: Payal Dev, Stebin Ben, Raj Shekhar, trackNumber: null, albumLength: null, year: 2023, genre: null, authorName: null, writerName: , discNumber: null, mimeType: null, trackDuration: 238210, bitrate: 320000, filePath: D:\test_test\#1 Martial Arts Movies\Baarish Hai Jaanam - Stebin Ben 320 Kbps.mp3}

hare is same mp3 file but folder are different

here is my code

var song = await MetadataRetriever.fromFile(File(path.toString()));
 print(song);

please help in my issue

@Ri-car-do-1989
Copy link

Ri-car-do-1989 commented Apr 1, 2024

I can confirm this problem. Also, I noticed another problem with naming. To clarify:

  • If the media parent folder has a numeric value in its name, the metadata will not be retrieved (e.g.: "folder0").
  • Also, if the media file has any diacritic in its name, the metadata will not be retrieved (e.g.: "música.mp3").

I tried looking at the source code, but the problem seems to be not in dart code, but in native C/C++ code. And I don't even know where to start in that C/C++ code to find the problem.

A test can be reproduced by doing the following:

  • Take a media file where metadata is correctly retrieved. Then change parent folder name, put a numeric value in its name. Result: Metadata not retrieved anymore.
  • Take a media file where metadata is correctly retrieved. Change the file name, adding a diacritic in its name (e.g.: change name from "musica.mp3" to "música.mp3"). Result: metadata not retrieved anymore.

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