deleting Tags from files

Jonas Sundström jonas at kirilla.com
Thu Jun 15 00:34:25 CEST 2006


moowei <emailmoo at gmail.com> wrote:
> Are there API calls in taglib that removes Tags 
>completely from a given file?

For MPEG, yes. I haven't looked at the other filetypes yet.

It's been a while, so maybe the API has changed.
(Caveat emptor.)

> I am trying to keep only one Tag in files (ID3v2)
> and remove all other tags (ID3v1, APE)

http://developer.kde.org/~wheeler/taglib/api/classTagLib_1_1MPEG_1_1File.html
" bool TagLib::MPEG::File::strip (int tags = AllTags)	

Something like this, maybe:

TagLib::MPEG::File * file;
file = new TagLib::MPEG::File(filename.Path());
file->strip(TagLib::MPEG::File::ID3v1);
file->strip(TagLib::MPEG::File::ID3v2);
file->strip(TagLib::MPEG::File::APE);

> also, is it possible to specify what version of ID3v2 to use? e.g.
> ID3v2.3 instead of 2.4?
> This is to be compliant with WMP since it can only read 2.3 with
> UTF-16 encoding...

According to docs - see URL - I'd guess no:

enum  	TagTypes {
  NoTags = 0x0000,
  ID3v1 = 0x0001,
  ID3v2 = 0x0002,
  APE = 0x0004, 
  AllTags = 0xffff
}

I wonder what happened to 0x0003.

/Jonas Sundström.    www.kirilla.com   BeOS / Haiku[-OS.org]




More information about the taglib-devel mailing list