It works fine on ID3v1, but not as good on ID3v2.
Code: Select all
$getID3 = new getID3; $TaggingFormat = 'UTF-8'; $getID3->setOption(array('encoding'=>$TaggingFormat)); require_once('inc/getid3/write.php'); $tagwriter = new getid3_writetags; $tagwriter->filename = $filepath; $tagwriter->tagformats = array('id3v1', 'id3v2.3'); $tagwriter->overwrite_tags = true; $tagwriter->tag_encoding = $TaggingFormat; $tagwriter->remove_other_tags = false; $TagData['title'] = $title; $TagData['artist'] = $artist; $TagData['album'] = $album; $TagData['genre'] = $genre; $TagData['year'] = $year; $TagData['comment'] = $version; $tagwriter->tag_data = $TagData; $tagwriter->WriteTags();
It writes all the fields on the id3v1-tag, but on the id3v2 it skips the genre and comment-tags. No warnings or anything.
I've tried the 2.x version of the source code, but that just gives me strange errors (For instance: after an attempt to write a id3v2 tag with the 2.x source code, the tagger removes the last char from both the artist and the year-field), so I've given up on the 2.x, since the 1.7.x has worked flawless for me (except this problem of course)
If anyone could point me in the right direction, I would be happy.