Overwrite Tags = false... ?

Post Reply
Posts: 1
Joined: Sat Oct 10, 2009 6:40 pm
Are you a spambot?: no

Overwrite Tags = false... ?

Post by d4onps » Sat Oct 10, 2009 6:46 pm

I saw a post a while back (viewtopic.php?f=4&t=525) with my issue but no answer was given. I want to just update one field in an ID3v2 tag, thus have set overwrite_tags to false. I'm getting the "Frame not allowed" error for the COMMENT field even though that's not the field I'm trying to update. Please, help. So much work put into this library, and it looks great otherwise, but without the ability to update a tag, it has little value for me.
Thanks alot!

Posts: 1
Joined: Thu Feb 18, 2010 3:29 am
Are you a spambot?: no

Re: Overwrite Tags = false... ?

Post by darioism » Thu Feb 18, 2010 3:44 am

I second that! GetID3 is a wonderful tool and has been extremely helpful in my projects. However, this overwrite issue seems to be a solid bug. I really hope someone can look into it soon, since I am not confident in my code without this fixed.

My current workaround is to copy tags to comments, import all tags into an array, change only the tags that I have specified, and then write it all back. This works, but again I'm not confident in it as a fix, since I think some info is being lost in translation. Here's a snippet of my workaround:

Code: Select all

$getID3 = new getID3;
$TagData = $getID3->Analyze($phy_path);

$metawriter->filename			= $phy_path;
$metawriter->tagformats			= $tagformats;
$metawriter->remove_other_tags	= false;
$metawriter->overwrite_tags		= true;	

//Empty 'comments' if this happened to be one of the incoming fields	

//Write existing tags to comments array
foreach($TagData['comments'] AS $field => $value)
	$TagData[$field]   = $value;

//Write new incoming tags to same array as above, which overwrites only those requested
foreach($info as $field => $value)
	$TagData[$field][0]   = $value;
$metawriter->tag_data = $TagData;

// write tags

Posts: 1
Joined: Thu Apr 22, 2010 10:57 pm
Are you a spambot?: no

Re: Overwrite Tags = false... ?

Post by bkdotcom » Fri Apr 23, 2010 12:47 pm

Just found getID3 today... and have immediately run into this bug.
any other workarounds or possible fixes?

darioism's solution doesn't save all the additional tags, such as BPM, user_url, etc... or album art

Post Reply