Changeset 29734 for trunk/src/wp-includes/ID3/module.tag.lyrics3.php
- Timestamp:
- 09/11/2014 07:06:33 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/module.tag.lyrics3.php
r23766 r29734 4 4 // available at http://getid3.sourceforge.net // 5 5 // or http://www.getid3.org // 6 // also https://github.com/JamesHeinrich/getID3 // 6 7 ///////////////////////////////////////////////////////////////// 7 8 // See readme.txt for more details // … … 28 29 } 29 30 30 fseek($this->getid3->fp,(0 - 128 - 9 - 6), SEEK_END); // end - ID3v1 - "LYRICSEND" - [Lyrics3size]31 $lyrics3_id3v1 = fread($this->getid3->fp,128 + 9 + 6);31 $this->fseek((0 - 128 - 9 - 6), SEEK_END); // end - ID3v1 - "LYRICSEND" - [Lyrics3size] 32 $lyrics3_id3v1 = $this->fread(128 + 9 + 6); 32 33 $lyrics3lsz = substr($lyrics3_id3v1, 0, 6); // Lyrics3size 33 34 $lyrics3end = substr($lyrics3_id3v1, 6, 9); // LYRICSEND or LYRICS200 … … 69 70 if (isset($info['ape']['tag_offset_start']) && ($info['ape']['tag_offset_start'] > 15)) { 70 71 71 fseek($this->getid3->fp, $info['ape']['tag_offset_start'] - 15, SEEK_SET);72 $lyrics3lsz = fread($this->getid3->fp,6);73 $lyrics3end = fread($this->getid3->fp,9);72 $this->fseek($info['ape']['tag_offset_start'] - 15); 73 $lyrics3lsz = $this->fread(6); 74 $lyrics3end = $this->fread(9); 74 75 75 76 if ($lyrics3end == 'LYRICSEND') { … … 102 103 if (!isset($info['ape'])) { 103 104 $GETID3_ERRORARRAY = &$info['warning']; 104 if (getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.apetag.php', __FILE__, false)) { 105 $getid3_temp = new getID3(); 106 $getid3_temp->openfile($this->getid3->filename); 107 $getid3_apetag = new getid3_apetag($getid3_temp); 108 $getid3_apetag->overrideendoffset = $info['lyrics3']['tag_offset_start']; 109 $getid3_apetag->Analyze(); 110 if (!empty($getid3_temp->info['ape'])) { 111 $info['ape'] = $getid3_temp->info['ape']; 112 } 113 if (!empty($getid3_temp->info['replay_gain'])) { 114 $info['replay_gain'] = $getid3_temp->info['replay_gain']; 115 } 116 unset($getid3_temp, $getid3_apetag); 117 } 105 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.apetag.php', __FILE__, true); 106 $getid3_temp = new getID3(); 107 $getid3_temp->openfile($this->getid3->filename); 108 $getid3_apetag = new getid3_apetag($getid3_temp); 109 $getid3_apetag->overrideendoffset = $info['lyrics3']['tag_offset_start']; 110 $getid3_apetag->Analyze(); 111 if (!empty($getid3_temp->info['ape'])) { 112 $info['ape'] = $getid3_temp->info['ape']; 113 } 114 if (!empty($getid3_temp->info['replay_gain'])) { 115 $info['replay_gain'] = $getid3_temp->info['replay_gain']; 116 } 117 unset($getid3_temp, $getid3_apetag); 118 118 } 119 119 … … 133 133 } 134 134 135 fseek($this->getid3->fp, $endoffset, SEEK_SET);135 $this->fseek($endoffset); 136 136 if ($length <= 0) { 137 137 return false; 138 138 } 139 $rawdata = fread($this->getid3->fp,$length);139 $rawdata = $this->fread($length); 140 140 141 141 $ParsedLyrics3['raw']['lyrics3version'] = $version; … … 170 170 $this->Lyrics3LyricsTimestampParse($ParsedLyrics3); 171 171 } else { 172 $info['error'][] = '"LYRICSEND" expected at '.( ftell($this->getid3->fp) - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';172 $info['error'][] = '"LYRICSEND" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead'; 173 173 return false; 174 174 } … … 218 218 } 219 219 } else { 220 $info['error'][] = '"LYRICS200" expected at '.( ftell($this->getid3->fp) - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';220 $info['error'][] = '"LYRICS200" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead'; 221 221 return false; 222 222 }
Note: See TracChangeset
for help on using the changeset viewer.