writing id3v2 tags to mp3 = warnings & no tags written .

The place for "I can't figure out how to..." questions.
Post Reply
milius.net
User
Posts: 16
Joined: Thu Feb 02, 2006 3:19 pm

writing id3v2 tags to mp3 = warnings & no tags written .

Post by milius.net » Wed Jun 21, 2006 2:53 pm

hello

I updated from 1.7.5 to 1.7.6 on my unix-system and now this code (writing id3v2 tags into an mp3 file) does not work anymore - but it did work with 1.7.5:

Code: Select all

	$TaggingFormat = 'ISO-8859-1';
	require_once('/getid3/getid3.php');

	// Initialize getID3 engine
	$getID3 = new getID3;
	getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'write.id3v2.php', __FILE__, true);
	$getID3->encoding = $TaggingFormat;
	
	require_once('/getid3/write.id3v2.php');

	// Initialize getID3 tag-writing module
	$tagwriter = new getid3_write_id3v2();
	$tagwriter->filename = $file;
	$tagwriter->tagformats = array('id3v2.4');
	
	// set various options (optional)
	$tagwriter->merge_existing_data = true; // bei 1.7.5 'true' abbruch mit: 'Invalid URL in WXXX ()'
	$tagwriter->overwrite_tags = true;
	$tagwriter->remove_other_tags = false; 
	$tagwriter->tag_encoding   = $TaggingFormat;


# populate data array
	$TagData['id3v2']['comments']['title'][0] 		= $_REQUEST['new_title'];
	$TagData['id3v2']['comments']['artist'][0]  		= $_REQUEST['new_artist'];


# schreiben
$tagwriter->tag_data = $TagData;


// write tags
if ($tagwriter->WriteID3v2()) 
	{
	echo 'yeah! successfully wrote tags';
	if (!empty($tagwriter->warnings)) {
		echo 'There were some warnings:<br>">'.implode('<br><br>', $tagwriter->warnings).'<br>';
	}
} else {
	echo 'ERROR: Failed to write tags!<br>">'.implode('<br><br>', $tagwriter->errors).'<br>'; 
 
file & path permissions are ok, all pathes are working and data get's populated right ...

I'm getting these warnings:

Code: Select all

Ignoring invalid ID3v2 frame type: "flags"

Ignoring invalid ID3v2 frame type: ""

Ignoring invalid ID3v2 frame type: ""

Ignoring invalid ID3v2 frame type: "padding"

Ignoring invalid ID3v2 frame type: ""

Ignoring invalid ID3v2 frame type: ""

Ignoring invalid ID3v2 frame type: "id3v2"
and no data is written into
id3v2 > comments > title or
id3v2 > comments > artist ...

what changed from 1.7.5 to 1.7.6?
why isn't the above code not working am more?

Post Reply