30 $this->errors[] =
'WriteLyrics3() not yet functional - cannot write Lyrics3';
37 $ThisFileInfo = $getID3->
analyze($this->filename);
38 if (isset($ThisFileInfo[
'lyrics3'][
'tag_offset_start']) && isset($ThisFileInfo[
'lyrics3'][
'tag_offset_end'])) {
39 if ($fp = @fopen($this->filename,
'a+b')) {
42 $oldignoreuserabort = ignore_user_abort(
true);
44 fseek($fp, $ThisFileInfo[
'lyrics3'][
'tag_offset_end'], SEEK_SET);
45 $DataAfterLyrics3 =
'';
46 if ($ThisFileInfo[
'filesize'] > $ThisFileInfo[
'lyrics3'][
'tag_offset_end']) {
47 $DataAfterLyrics3 = fread($fp, $ThisFileInfo[
'filesize'] - $ThisFileInfo[
'lyrics3'][
'tag_offset_end']);
50 ftruncate($fp, $ThisFileInfo[
'lyrics3'][
'tag_offset_start']);
52 if (!empty($DataAfterLyrics3)) {
53 fseek($fp, $ThisFileInfo[
'lyrics3'][
'tag_offset_start'], SEEK_SET);
54 fwrite($fp, $DataAfterLyrics3, strlen($DataAfterLyrics3));
59 ignore_user_abort($oldignoreuserabort);
65 $this->errors[] =
'Cannot open "'.$this->filename.
'" in "a+b" mode';