A dart wrapper of TagLib.
Supported formats:
- MP3
- FLAC
- MP4 (aka. M4A, aka. ALAC)
Supported fiunctionalities:
- Read/Update/Delete tags (see below)
- Read/Update/Delete artwork
- Read/Update/Delete lyrics
brew install cmake
brew install taglib
HOMEBREW_PREFIX
variable needs to be defined:
export HOMEBREW_PREFIX="$(brew --prefix)"
Add as a pubspec.yaml
dependency.
To read/write tags:
TagLib tagLib = TagLib();
Tags tags = tagLib.getAudioTags(filename);
if (tags.valid) {
...
}
// update tags
tagLib.setAudioTag(filename, tags);
To display artwork:
TagLib tagLib = TagLib();
FutureBuilder(
future: tagLib.getArtworkBytes(filename),
builder: (_, snapshot) => Image.memory(snapshot.data)
)
To read/write lyrics:
TagLib tagLib = TagLib();
String lyrics = tagLib.getLyrics(filename);
// update lyrics
tagLib.setLyrics(filename, lyrics);
make tests
- Title
- Album
- Artist (Album Artist)
- Performer
- Composer
- Genre
- Copyright
- Comment
- Year
- Compilation
- Volume/Album Index
- Volume/Album Count
- Track Index
- Track Count