diff --git a/lib/getid3/THIS_HAS_BEEN_MODIFIED.txt b/lib/getid3/THIS_HAS_BEEN_MODIFIED.txt new file mode 100644 index 00000000..e2105a17 --- /dev/null +++ b/lib/getid3/THIS_HAS_BEEN_MODIFIED.txt @@ -0,0 +1,5 @@ +In compliance with GPL, this message is to notify you that getID3 has been modified. + +getid3.php was modified September 23, 2012 to add a boolean to force MP3 checking. + +It carries the same license as its original. \ No newline at end of file diff --git a/lib/getid3/getid3/getid3.php b/lib/getid3/getid3/getid3.php index e8a3f7e2..ca351bcd 100644 --- a/lib/getid3/getid3/getid3.php +++ b/lib/getid3/getid3/getid3.php @@ -1,4 +1,7 @@ // // available at http://getid3.sourceforge.net // @@ -343,7 +346,7 @@ class getID3 } // public: analyze file - function analyze($filename) { + function analyze($filename, $forcemp3 = FALSE) { try { if (!$this->openfile($filename)) { return $this->info; @@ -390,7 +393,7 @@ class getID3 $formattest = fread($this->fp, 32774); // determine format - $determined_format = $this->GetFileFormat($formattest, $filename); + $determined_format = $this->GetFileFormat($formattest, $filename, $forcemp3); // unable to determine file format if (!$determined_format) { @@ -1102,7 +1105,7 @@ class getID3 - function GetFileFormat(&$filedata, $filename='') { + function GetFileFormat(&$filedata, $filename='', $forcemp3) { // this function will determine the format of a file based on usually // the first 2-4 bytes of the file (8 bytes for PNG, 16 bytes for JPG, // and in the case of ISO CD image, 6 bytes offset 32kb from the start @@ -1119,7 +1122,7 @@ class getID3 } - if (preg_match('#\.mp[123a]$#i', $filename)) { + if (preg_match('#\.mp[123a]$#i', $filename) || $forcemp3 == TRUE) { // Too many mp3 encoders on the market put gabage in front of mpeg files // use assume format on these if format detection failed $GetFileFormatArray = $this->GetFileFormatArray();