alexmercerind / flutter_media_metadata

A Flutter plugin to read 🔖 metadata of 🎵 media files. Supports Windows, Linux, macOS, Android, iOS & Web.
MIT License
69 stars 35 forks source link

Error in Metadata.fromMap #18

Closed DiscombobulatedDrag closed 2 years ago

DiscombobulatedDrag commented 2 years ago

Error(type 'int' is not a subtype of type 'String?') in Metadata.fromMap

map['metadata']['year'] in Metadata.fromMap expected as String. https://github.com/harmonoid/flutter_media_metadata/blob/862cccc41dc80069a343cd9d9c954a97516023b8/lib/flutter_media_metadata.dart#L58

But MetadataRetriever put the year as Integer if extracted metadata converted to int. https://github.com/harmonoid/flutter_media_metadata/blob/862cccc41dc80069a343cd9d9c954a97516023b8/android/src/main/java/com/alexmercerind/flutter_media_metadata/MetadataRetriever.java#L32

Environment

Android mp3(ID3v2.3.0) kid3

Step to reproduce