60 $info = &$this->getid3->info;
62 $info[
'fileformat'] =
'cue';
89 foreach (explode(
"\n", str_replace(
"\r", null, $filedata)) as $line) {
90 if ( (strlen($line) > 0) && ($line[0] !=
'#')) {
91 $cue_lines[] = trim($line);
108 for ($i=0; $i < count(
$file); $i++) {
109 list($key) = explode(
' ', strtolower(
$file[$i]), 2);
136 if (isset($currentFile)) {
137 $this->cuesheet[
'tracks'][$track_on][
'datafile'] = $currentFile;
156 $explodedline = explode(
' ', $line, 3);
157 $comment_REM = (isset($explodedline[0]) ? $explodedline[0] :
'');
158 $comment_type = (isset($explodedline[1]) ? $explodedline[1] :
'');
159 $comment_data = (isset($explodedline[2]) ? $explodedline[2] :
'');
160 if (($comment_REM ==
'REM') && $comment_type) {
161 $comment_type = strtolower($comment_type);
162 $commment_data = trim($comment_data,
' "');
163 if ($track_on != -1) {
164 $this->cuesheet[
'tracks'][$track_on][
'comments'][$comment_type][] = $comment_data;
166 $this->cuesheet[
'comments'][$comment_type][] = $comment_data;
180 $line = substr($line, strpos($line,
' ') + 1);
181 $type = strtolower(substr($line, strrpos($line,
' ')));
184 $line = substr($line, 0, strrpos($line,
' ') - 1);
187 $line = trim($line,
'"');
189 return array(
'filename'=>$line,
'type'=>$type);
200 if ($track_on != -1) {
201 foreach (explode(
' ', strtolower($line)) as $type) {
205 $this->cuesheet[
'tracks'][$track_on][
'flags'] =
array(
218 $this->cuesheet[
'tracks'][$track_on][
'flags'][$type] =
true;
235 if ( strlen($line) > 0 ) {
236 if ($track_on == -1) {
237 $this->cuesheet[
'garbage'][] = $line;
239 $this->cuesheet[
'tracks'][$track_on][
'garbage'][] = $line;
252 $type = strtolower(substr($line, 0, strpos($line,
' ')));
253 $line = substr($line, strpos($line,
' ') + 1);
255 if ($type ==
'index') {
257 $number = intval(substr($line, 0, strpos($line,
' ')));
258 $line = substr($line, strpos($line,
' ') + 1);
262 $explodedline = explode(
':', $line);
263 $minutes = (isset($explodedline[0]) ? $explodedline[0] :
'');
264 $seconds = (isset($explodedline[1]) ? $explodedline[1] :
'');
265 $frames = (isset($explodedline[2]) ? $explodedline[2] :
'');
269 $this->cuesheet[
'tracks'][$track_on][$type][$number] =
array(
'minutes'=>intval($minutes),
'seconds'=>intval($seconds),
'frames'=>intval($frames));
273 $this->cuesheet[
'tracks'][$track_on][$type] =
array(
'minutes'=>intval($minutes),
'seconds'=>intval($seconds),
'frames'=>intval($frames));
285 $category = strtolower(substr($line, 0, strpos($line,
' ')));
286 $line = substr($line, strpos($line,
' ') + 1);
289 $line = trim($line,
'"');
298 if ($track_on == -1) {
299 $this->cuesheet[$category] = $line;
301 $this->cuesheet[
'tracks'][$track_on][$category] = $line;
317 $line = substr($line, strpos($line,
' ') + 1);
318 $track = ltrim(substr($line, 0, strpos($line,
' ')),
'0');
321 $datatype = strtolower(substr($line, strpos($line,
' ') + 1));
323 $this->cuesheet[
'tracks'][$track_on] =
array(
'track_number'=>$track,
'datatype'=>$datatype);
readCueSheetFilename($filename)
parseComment($line, $track_on)
Parses the REM command.
GetId3() by James Heinrich info@getid3.org //.
parseFlags($line, $track_on)
Parses the FLAG command.
parseIndex($line, $track_on)
Parses the INDEX command of a TRACK.
parseGarbage($line, $track_on)
Collect any unidentified data.
GetId3() by James Heinrich info@getid3.org //.
parseString($line, $track_on)
Create styles array
The data for the language used.
parseTrack($line, $track_on)
Parses the TRACK command.
parseFile($line)
Parses the FILE command.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file