Dart Tags

pub package Build Status

The library for parsing ID3 tags, written in pure Dart.

You can found sample app written with flutter framework here.

License

project under MIT license

Changelogs

full changelog

0.1.2 (HotFix)

  • rise limmit of tag according to the issue #3

0.1.1

  • added writer for custom tags (TXXX)
  • added writer for attached picture (APIC tagged frame)
  • update tests for TXXX and APIC writers

Instalation

add dependency in pubsec.yaml

dependencies:
  dart_tags: ^0.1.0

Usage

A simple usage example:

import 'dart:io';

import 'package:dart_tags/dart_tags.dart';

main(List<String> args) {
  TagProcessor tp = new TagProcessor();

  File f = new File(args[0]);
  
  tp.getTagsFromByteArray(f.readAsBytes()).then((l) => l.forEach((f) => print(f)));
}

Experimental

And since 0.1.0 you can write some tags into the byte array:

import 'dart:io';

import 'package:dart_tags/dart_tags.dart';

main(List<String> args) {
  TagProcessor tp = new TagProcessor();

  final f = new File(args[0]);

  final tag = Tag()
    ..tags = {
      'title': 'foo',
      'artist': 'bar',
      'album': 'baz',
      'year': '2010',
      'comment': 'lol it is a comment',
      'track': '6',
      'genre': 'Dream'
    }
    ..type = 'ID3'
    ..version = '2.4';
  
  List<int> newByteArrayWithTags = tp.putTagsToByteArray(f.readAsBytes(), [tag]);
}

Features and bugs

Please feel free for feature requests and bugs at the issue tracker.

Libraries

dart_tags
The library helps to gets tags from mp3 files. [...]