Edit File by line
/home/barbar84/www/wp-inclu.../ID3
File: getid3.php
$real_filesize = getid3_lib::getFileSizeSyscall($this->info['filenamepath']);
[500] Fix | Delete
[501] Fix | Delete
if ($real_filesize === false) {
[502] Fix | Delete
unset($this->info['filesize']);
[503] Fix | Delete
fclose($this->fp);
[504] Fix | Delete
throw new getid3_exception('Unable to determine actual filesize. File is most likely larger than '.round(PHP_INT_MAX / 1073741824).'GB and is not supported by PHP.');
[505] Fix | Delete
} elseif (getid3_lib::intValueSupported($real_filesize)) {
[506] Fix | Delete
unset($this->info['filesize']);
[507] Fix | Delete
fclose($this->fp);
[508] Fix | Delete
throw new getid3_exception('PHP seems to think the file is larger than '.round(PHP_INT_MAX / 1073741824).'GB, but filesystem reports it as '.number_format($real_filesize / 1073741824, 3).'GB, please report to info@getid3.org');
[509] Fix | Delete
}
[510] Fix | Delete
$this->info['filesize'] = $real_filesize;
[511] Fix | Delete
$this->warning('File is larger than '.round(PHP_INT_MAX / 1073741824).'GB (filesystem reports it as '.number_format($real_filesize / 1073741824, 3).'GB) and is not properly supported by PHP.');
[512] Fix | Delete
}
[513] Fix | Delete
}
[514] Fix | Delete
[515] Fix | Delete
return true;
[516] Fix | Delete
[517] Fix | Delete
} catch (Exception $e) {
[518] Fix | Delete
$this->error($e->getMessage());
[519] Fix | Delete
}
[520] Fix | Delete
return false;
[521] Fix | Delete
}
[522] Fix | Delete
[523] Fix | Delete
/**
[524] Fix | Delete
* analyze file
[525] Fix | Delete
*
[526] Fix | Delete
* @param string $filename
[527] Fix | Delete
* @param int $filesize
[528] Fix | Delete
* @param string $original_filename
[529] Fix | Delete
* @param resource $fp
[530] Fix | Delete
*
[531] Fix | Delete
* @return array
[532] Fix | Delete
*/
[533] Fix | Delete
public function analyze($filename, $filesize=null, $original_filename='', $fp=null) {
[534] Fix | Delete
try {
[535] Fix | Delete
if (!$this->openfile($filename, $filesize, $fp)) {
[536] Fix | Delete
return $this->info;
[537] Fix | Delete
}
[538] Fix | Delete
[539] Fix | Delete
// Handle tags
[540] Fix | Delete
foreach (array('id3v2'=>'id3v2', 'id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
[541] Fix | Delete
$option_tag = 'option_tag_'.$tag_name;
[542] Fix | Delete
if ($this->$option_tag) {
[543] Fix | Delete
$this->include_module('tag.'.$tag_name);
[544] Fix | Delete
try {
[545] Fix | Delete
$tag_class = 'getid3_'.$tag_name;
[546] Fix | Delete
$tag = new $tag_class($this);
[547] Fix | Delete
$tag->Analyze();
[548] Fix | Delete
}
[549] Fix | Delete
catch (getid3_exception $e) {
[550] Fix | Delete
throw $e;
[551] Fix | Delete
}
[552] Fix | Delete
}
[553] Fix | Delete
}
[554] Fix | Delete
if (isset($this->info['id3v2']['tag_offset_start'])) {
[555] Fix | Delete
$this->info['avdataoffset'] = max($this->info['avdataoffset'], $this->info['id3v2']['tag_offset_end']);
[556] Fix | Delete
}
[557] Fix | Delete
foreach (array('id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
[558] Fix | Delete
if (isset($this->info[$tag_key]['tag_offset_start'])) {
[559] Fix | Delete
$this->info['avdataend'] = min($this->info['avdataend'], $this->info[$tag_key]['tag_offset_start']);
[560] Fix | Delete
}
[561] Fix | Delete
}
[562] Fix | Delete
[563] Fix | Delete
// ID3v2 detection (NOT parsing), even if ($this->option_tag_id3v2 == false) done to make fileformat easier
[564] Fix | Delete
if (!$this->option_tag_id3v2) {
[565] Fix | Delete
fseek($this->fp, 0);
[566] Fix | Delete
$header = fread($this->fp, 10);
[567] Fix | Delete
if ((substr($header, 0, 3) == 'ID3') && (strlen($header) == 10)) {
[568] Fix | Delete
$this->info['id3v2']['header'] = true;
[569] Fix | Delete
$this->info['id3v2']['majorversion'] = ord($header[3]);
[570] Fix | Delete
$this->info['id3v2']['minorversion'] = ord($header[4]);
[571] Fix | Delete
$this->info['avdataoffset'] += getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length
[572] Fix | Delete
}
[573] Fix | Delete
}
[574] Fix | Delete
[575] Fix | Delete
// read 32 kb file data
[576] Fix | Delete
fseek($this->fp, $this->info['avdataoffset']);
[577] Fix | Delete
$formattest = fread($this->fp, 32774);
[578] Fix | Delete
[579] Fix | Delete
// determine format
[580] Fix | Delete
$determined_format = $this->GetFileFormat($formattest, ($original_filename ? $original_filename : $filename));
[581] Fix | Delete
[582] Fix | Delete
// unable to determine file format
[583] Fix | Delete
if (!$determined_format) {
[584] Fix | Delete
fclose($this->fp);
[585] Fix | Delete
return $this->error('unable to determine file format');
[586] Fix | Delete
}
[587] Fix | Delete
[588] Fix | Delete
// check for illegal ID3 tags
[589] Fix | Delete
if (isset($determined_format['fail_id3']) && (in_array('id3v1', $this->info['tags']) || in_array('id3v2', $this->info['tags']))) {
[590] Fix | Delete
if ($determined_format['fail_id3'] === 'ERROR') {
[591] Fix | Delete
fclose($this->fp);
[592] Fix | Delete
return $this->error('ID3 tags not allowed on this file type.');
[593] Fix | Delete
} elseif ($determined_format['fail_id3'] === 'WARNING') {
[594] Fix | Delete
$this->warning('ID3 tags not allowed on this file type.');
[595] Fix | Delete
}
[596] Fix | Delete
}
[597] Fix | Delete
[598] Fix | Delete
// check for illegal APE tags
[599] Fix | Delete
if (isset($determined_format['fail_ape']) && in_array('ape', $this->info['tags'])) {
[600] Fix | Delete
if ($determined_format['fail_ape'] === 'ERROR') {
[601] Fix | Delete
fclose($this->fp);
[602] Fix | Delete
return $this->error('APE tags not allowed on this file type.');
[603] Fix | Delete
} elseif ($determined_format['fail_ape'] === 'WARNING') {
[604] Fix | Delete
$this->warning('APE tags not allowed on this file type.');
[605] Fix | Delete
}
[606] Fix | Delete
}
[607] Fix | Delete
[608] Fix | Delete
// set mime type
[609] Fix | Delete
$this->info['mime_type'] = $determined_format['mime_type'];
[610] Fix | Delete
[611] Fix | Delete
// supported format signature pattern detected, but module deleted
[612] Fix | Delete
if (!file_exists(GETID3_INCLUDEPATH.$determined_format['include'])) {
[613] Fix | Delete
fclose($this->fp);
[614] Fix | Delete
return $this->error('Format not supported, module "'.$determined_format['include'].'" was removed.');
[615] Fix | Delete
}
[616] Fix | Delete
[617] Fix | Delete
// module requires mb_convert_encoding/iconv support
[618] Fix | Delete
// Check encoding/iconv support
[619] Fix | Delete
if (!empty($determined_format['iconv_req']) && !function_exists('mb_convert_encoding') && !function_exists('iconv') && !in_array($this->encoding, array('ISO-8859-1', 'UTF-8', 'UTF-16LE', 'UTF-16BE', 'UTF-16'))) {
[620] Fix | Delete
$errormessage = 'mb_convert_encoding() or iconv() support is required for this module ('.$determined_format['include'].') for encodings other than ISO-8859-1, UTF-8, UTF-16LE, UTF16-BE, UTF-16. ';
[621] Fix | Delete
if (GETID3_OS_ISWINDOWS) {
[622] Fix | Delete
$errormessage .= 'PHP does not have mb_convert_encoding() or iconv() support. Please enable php_mbstring.dll / php_iconv.dll in php.ini, and copy php_mbstring.dll / iconv.dll from c:/php/dlls to c:/windows/system32';
[623] Fix | Delete
} else {
[624] Fix | Delete
$errormessage .= 'PHP is not compiled with mb_convert_encoding() or iconv() support. Please recompile with the --enable-mbstring / --with-iconv switch';
[625] Fix | Delete
}
[626] Fix | Delete
return $this->error($errormessage);
[627] Fix | Delete
}
[628] Fix | Delete
[629] Fix | Delete
// include module
[630] Fix | Delete
include_once(GETID3_INCLUDEPATH.$determined_format['include']);
[631] Fix | Delete
[632] Fix | Delete
// instantiate module class
[633] Fix | Delete
$class_name = 'getid3_'.$determined_format['module'];
[634] Fix | Delete
if (!class_exists($class_name)) {
[635] Fix | Delete
return $this->error('Format not supported, module "'.$determined_format['include'].'" is corrupt.');
[636] Fix | Delete
}
[637] Fix | Delete
$class = new $class_name($this);
[638] Fix | Delete
$class->Analyze();
[639] Fix | Delete
unset($class);
[640] Fix | Delete
[641] Fix | Delete
// close file
[642] Fix | Delete
fclose($this->fp);
[643] Fix | Delete
[644] Fix | Delete
// process all tags - copy to 'tags' and convert charsets
[645] Fix | Delete
if ($this->option_tags_process) {
[646] Fix | Delete
$this->HandleAllTags();
[647] Fix | Delete
}
[648] Fix | Delete
[649] Fix | Delete
// perform more calculations
[650] Fix | Delete
if ($this->option_extra_info) {
[651] Fix | Delete
$this->ChannelsBitratePlaytimeCalculations();
[652] Fix | Delete
$this->CalculateCompressionRatioVideo();
[653] Fix | Delete
$this->CalculateCompressionRatioAudio();
[654] Fix | Delete
$this->CalculateReplayGain();
[655] Fix | Delete
$this->ProcessAudioStreams();
[656] Fix | Delete
}
[657] Fix | Delete
[658] Fix | Delete
// get the MD5 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
[659] Fix | Delete
if ($this->option_md5_data) {
[660] Fix | Delete
// do not calc md5_data if md5_data_source is present - set by flac only - future MPC/SV8 too
[661] Fix | Delete
if (!$this->option_md5_data_source || empty($this->info['md5_data_source'])) {
[662] Fix | Delete
$this->getHashdata('md5');
[663] Fix | Delete
}
[664] Fix | Delete
}
[665] Fix | Delete
[666] Fix | Delete
// get the SHA1 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
[667] Fix | Delete
if ($this->option_sha1_data) {
[668] Fix | Delete
$this->getHashdata('sha1');
[669] Fix | Delete
}
[670] Fix | Delete
[671] Fix | Delete
// remove undesired keys
[672] Fix | Delete
$this->CleanUp();
[673] Fix | Delete
[674] Fix | Delete
} catch (Exception $e) {
[675] Fix | Delete
$this->error('Caught exception: '.$e->getMessage());
[676] Fix | Delete
}
[677] Fix | Delete
[678] Fix | Delete
// return info array
[679] Fix | Delete
return $this->info;
[680] Fix | Delete
}
[681] Fix | Delete
[682] Fix | Delete
[683] Fix | Delete
/**
[684] Fix | Delete
* Error handling.
[685] Fix | Delete
*
[686] Fix | Delete
* @param string $message
[687] Fix | Delete
*
[688] Fix | Delete
* @return array
[689] Fix | Delete
*/
[690] Fix | Delete
public function error($message) {
[691] Fix | Delete
$this->CleanUp();
[692] Fix | Delete
if (!isset($this->info['error'])) {
[693] Fix | Delete
$this->info['error'] = array();
[694] Fix | Delete
}
[695] Fix | Delete
$this->info['error'][] = $message;
[696] Fix | Delete
return $this->info;
[697] Fix | Delete
}
[698] Fix | Delete
[699] Fix | Delete
[700] Fix | Delete
/**
[701] Fix | Delete
* Warning handling.
[702] Fix | Delete
*
[703] Fix | Delete
* @param string $message
[704] Fix | Delete
*
[705] Fix | Delete
* @return bool
[706] Fix | Delete
*/
[707] Fix | Delete
public function warning($message) {
[708] Fix | Delete
$this->info['warning'][] = $message;
[709] Fix | Delete
return true;
[710] Fix | Delete
}
[711] Fix | Delete
[712] Fix | Delete
[713] Fix | Delete
/**
[714] Fix | Delete
* @return bool
[715] Fix | Delete
*/
[716] Fix | Delete
private function CleanUp() {
[717] Fix | Delete
[718] Fix | Delete
// remove possible empty keys
[719] Fix | Delete
$AVpossibleEmptyKeys = array('dataformat', 'bits_per_sample', 'encoder_options', 'streams', 'bitrate');
[720] Fix | Delete
foreach ($AVpossibleEmptyKeys as $dummy => $key) {
[721] Fix | Delete
if (empty($this->info['audio'][$key]) && isset($this->info['audio'][$key])) {
[722] Fix | Delete
unset($this->info['audio'][$key]);
[723] Fix | Delete
}
[724] Fix | Delete
if (empty($this->info['video'][$key]) && isset($this->info['video'][$key])) {
[725] Fix | Delete
unset($this->info['video'][$key]);
[726] Fix | Delete
}
[727] Fix | Delete
}
[728] Fix | Delete
[729] Fix | Delete
// remove empty root keys
[730] Fix | Delete
if (!empty($this->info)) {
[731] Fix | Delete
foreach ($this->info as $key => $value) {
[732] Fix | Delete
if (empty($this->info[$key]) && ($this->info[$key] !== 0) && ($this->info[$key] !== '0')) {
[733] Fix | Delete
unset($this->info[$key]);
[734] Fix | Delete
}
[735] Fix | Delete
}
[736] Fix | Delete
}
[737] Fix | Delete
[738] Fix | Delete
// remove meaningless entries from unknown-format files
[739] Fix | Delete
if (empty($this->info['fileformat'])) {
[740] Fix | Delete
if (isset($this->info['avdataoffset'])) {
[741] Fix | Delete
unset($this->info['avdataoffset']);
[742] Fix | Delete
}
[743] Fix | Delete
if (isset($this->info['avdataend'])) {
[744] Fix | Delete
unset($this->info['avdataend']);
[745] Fix | Delete
}
[746] Fix | Delete
}
[747] Fix | Delete
[748] Fix | Delete
// remove possible duplicated identical entries
[749] Fix | Delete
if (!empty($this->info['error'])) {
[750] Fix | Delete
$this->info['error'] = array_values(array_unique($this->info['error']));
[751] Fix | Delete
}
[752] Fix | Delete
if (!empty($this->info['warning'])) {
[753] Fix | Delete
$this->info['warning'] = array_values(array_unique($this->info['warning']));
[754] Fix | Delete
}
[755] Fix | Delete
[756] Fix | Delete
// remove "global variable" type keys
[757] Fix | Delete
unset($this->info['php_memory_limit']);
[758] Fix | Delete
[759] Fix | Delete
return true;
[760] Fix | Delete
}
[761] Fix | Delete
[762] Fix | Delete
/**
[763] Fix | Delete
* Return array containing information about all supported formats.
[764] Fix | Delete
*
[765] Fix | Delete
* @return array
[766] Fix | Delete
*/
[767] Fix | Delete
public function GetFileFormatArray() {
[768] Fix | Delete
static $format_info = array();
[769] Fix | Delete
if (empty($format_info)) {
[770] Fix | Delete
$format_info = array(
[771] Fix | Delete
[772] Fix | Delete
// Audio formats
[773] Fix | Delete
[774] Fix | Delete
// AC-3 - audio - Dolby AC-3 / Dolby Digital
[775] Fix | Delete
'ac3' => array(
[776] Fix | Delete
'pattern' => '^\\x0B\\x77',
[777] Fix | Delete
'group' => 'audio',
[778] Fix | Delete
'module' => 'ac3',
[779] Fix | Delete
'mime_type' => 'audio/ac3',
[780] Fix | Delete
),
[781] Fix | Delete
[782] Fix | Delete
// AAC - audio - Advanced Audio Coding (AAC) - ADIF format
[783] Fix | Delete
'adif' => array(
[784] Fix | Delete
'pattern' => '^ADIF',
[785] Fix | Delete
'group' => 'audio',
[786] Fix | Delete
'module' => 'aac',
[787] Fix | Delete
'mime_type' => 'audio/aac',
[788] Fix | Delete
'fail_ape' => 'WARNING',
[789] Fix | Delete
),
[790] Fix | Delete
[791] Fix | Delete
/*
[792] Fix | Delete
// AA - audio - Audible Audiobook
[793] Fix | Delete
'aa' => array(
[794] Fix | Delete
'pattern' => '^.{4}\\x57\\x90\\x75\\x36',
[795] Fix | Delete
'group' => 'audio',
[796] Fix | Delete
'module' => 'aa',
[797] Fix | Delete
'mime_type' => 'audio/audible',
[798] Fix | Delete
),
[799] Fix | Delete
*/
[800] Fix | Delete
// AAC - audio - Advanced Audio Coding (AAC) - ADTS format (very similar to MP3)
[801] Fix | Delete
'adts' => array(
[802] Fix | Delete
'pattern' => '^\\xFF[\\xF0-\\xF1\\xF8-\\xF9]',
[803] Fix | Delete
'group' => 'audio',
[804] Fix | Delete
'module' => 'aac',
[805] Fix | Delete
'mime_type' => 'audio/aac',
[806] Fix | Delete
'fail_ape' => 'WARNING',
[807] Fix | Delete
),
[808] Fix | Delete
[809] Fix | Delete
[810] Fix | Delete
// AU - audio - NeXT/Sun AUdio (AU)
[811] Fix | Delete
'au' => array(
[812] Fix | Delete
'pattern' => '^\\.snd',
[813] Fix | Delete
'group' => 'audio',
[814] Fix | Delete
'module' => 'au',
[815] Fix | Delete
'mime_type' => 'audio/basic',
[816] Fix | Delete
),
[817] Fix | Delete
[818] Fix | Delete
// AMR - audio - Adaptive Multi Rate
[819] Fix | Delete
'amr' => array(
[820] Fix | Delete
'pattern' => '^\\x23\\x21AMR\\x0A', // #!AMR[0A]
[821] Fix | Delete
'group' => 'audio',
[822] Fix | Delete
'module' => 'amr',
[823] Fix | Delete
'mime_type' => 'audio/amr',
[824] Fix | Delete
),
[825] Fix | Delete
[826] Fix | Delete
// AVR - audio - Audio Visual Research
[827] Fix | Delete
'avr' => array(
[828] Fix | Delete
'pattern' => '^2BIT',
[829] Fix | Delete
'group' => 'audio',
[830] Fix | Delete
'module' => 'avr',
[831] Fix | Delete
'mime_type' => 'application/octet-stream',
[832] Fix | Delete
),
[833] Fix | Delete
[834] Fix | Delete
// BONK - audio - Bonk v0.9+
[835] Fix | Delete
'bonk' => array(
[836] Fix | Delete
'pattern' => '^\\x00(BONK|INFO|META| ID3)',
[837] Fix | Delete
'group' => 'audio',
[838] Fix | Delete
'module' => 'bonk',
[839] Fix | Delete
'mime_type' => 'audio/xmms-bonk',
[840] Fix | Delete
),
[841] Fix | Delete
[842] Fix | Delete
// DSF - audio - Direct Stream Digital (DSD) Storage Facility files (DSF) - https://en.wikipedia.org/wiki/Direct_Stream_Digital
[843] Fix | Delete
'dsf' => array(
[844] Fix | Delete
'pattern' => '^DSD ', // including trailing space: 44 53 44 20
[845] Fix | Delete
'group' => 'audio',
[846] Fix | Delete
'module' => 'dsf',
[847] Fix | Delete
'mime_type' => 'audio/dsd',
[848] Fix | Delete
),
[849] Fix | Delete
[850] Fix | Delete
// DSS - audio - Digital Speech Standard
[851] Fix | Delete
'dss' => array(
[852] Fix | Delete
'pattern' => '^[\\x02-\\x08]ds[s2]',
[853] Fix | Delete
'group' => 'audio',
[854] Fix | Delete
'module' => 'dss',
[855] Fix | Delete
'mime_type' => 'application/octet-stream',
[856] Fix | Delete
),
[857] Fix | Delete
[858] Fix | Delete
// DSDIFF - audio - Direct Stream Digital Interchange File Format
[859] Fix | Delete
'dsdiff' => array(
[860] Fix | Delete
'pattern' => '^FRM8',
[861] Fix | Delete
'group' => 'audio',
[862] Fix | Delete
'module' => 'dsdiff',
[863] Fix | Delete
'mime_type' => 'audio/dsd',
[864] Fix | Delete
),
[865] Fix | Delete
[866] Fix | Delete
// DTS - audio - Dolby Theatre System
[867] Fix | Delete
'dts' => array(
[868] Fix | Delete
'pattern' => '^\\x7F\\xFE\\x80\\x01',
[869] Fix | Delete
'group' => 'audio',
[870] Fix | Delete
'module' => 'dts',
[871] Fix | Delete
'mime_type' => 'audio/dts',
[872] Fix | Delete
),
[873] Fix | Delete
[874] Fix | Delete
// FLAC - audio - Free Lossless Audio Codec
[875] Fix | Delete
'flac' => array(
[876] Fix | Delete
'pattern' => '^fLaC',
[877] Fix | Delete
'group' => 'audio',
[878] Fix | Delete
'module' => 'flac',
[879] Fix | Delete
'mime_type' => 'audio/flac',
[880] Fix | Delete
),
[881] Fix | Delete
[882] Fix | Delete
// LA - audio - Lossless Audio (LA)
[883] Fix | Delete
'la' => array(
[884] Fix | Delete
'pattern' => '^LA0[2-4]',
[885] Fix | Delete
'group' => 'audio',
[886] Fix | Delete
'module' => 'la',
[887] Fix | Delete
'mime_type' => 'application/octet-stream',
[888] Fix | Delete
),
[889] Fix | Delete
[890] Fix | Delete
// LPAC - audio - Lossless Predictive Audio Compression (LPAC)
[891] Fix | Delete
'lpac' => array(
[892] Fix | Delete
'pattern' => '^LPAC',
[893] Fix | Delete
'group' => 'audio',
[894] Fix | Delete
'module' => 'lpac',
[895] Fix | Delete
'mime_type' => 'application/octet-stream',
[896] Fix | Delete
),
[897] Fix | Delete
[898] Fix | Delete
// MIDI - audio - MIDI (Musical Instrument Digital Interface)
[899] Fix | Delete
'midi' => array(
[900] Fix | Delete
'pattern' => '^MThd',
[901] Fix | Delete
'group' => 'audio',
[902] Fix | Delete
'module' => 'midi',
[903] Fix | Delete
'mime_type' => 'audio/midi',
[904] Fix | Delete
),
[905] Fix | Delete
[906] Fix | Delete
// MAC - audio - Monkey's Audio Compressor
[907] Fix | Delete
'mac' => array(
[908] Fix | Delete
'pattern' => '^MAC ',
[909] Fix | Delete
'group' => 'audio',
[910] Fix | Delete
'module' => 'monkey',
[911] Fix | Delete
'mime_type' => 'audio/x-monkeys-audio',
[912] Fix | Delete
),
[913] Fix | Delete
[914] Fix | Delete
// has been known to produce false matches in random files (e.g. JPEGs), leave out until more precise matching available
[915] Fix | Delete
// // MOD - audio - MODule (assorted sub-formats)
[916] Fix | Delete
// 'mod' => array(
[917] Fix | Delete
// 'pattern' => '^.{1080}(M\\.K\\.|M!K!|FLT4|FLT8|[5-9]CHN|[1-3][0-9]CH)',
[918] Fix | Delete
// 'group' => 'audio',
[919] Fix | Delete
// 'module' => 'mod',
[920] Fix | Delete
// 'option' => 'mod',
[921] Fix | Delete
// 'mime_type' => 'audio/mod',
[922] Fix | Delete
// ),
[923] Fix | Delete
[924] Fix | Delete
// MOD - audio - MODule (Impulse Tracker)
[925] Fix | Delete
'it' => array(
[926] Fix | Delete
'pattern' => '^IMPM',
[927] Fix | Delete
'group' => 'audio',
[928] Fix | Delete
'module' => 'mod',
[929] Fix | Delete
//'option' => 'it',
[930] Fix | Delete
'mime_type' => 'audio/it',
[931] Fix | Delete
),
[932] Fix | Delete
[933] Fix | Delete
// MOD - audio - MODule (eXtended Module, various sub-formats)
[934] Fix | Delete
'xm' => array(
[935] Fix | Delete
'pattern' => '^Extended Module',
[936] Fix | Delete
'group' => 'audio',
[937] Fix | Delete
'module' => 'mod',
[938] Fix | Delete
//'option' => 'xm',
[939] Fix | Delete
'mime_type' => 'audio/xm',
[940] Fix | Delete
),
[941] Fix | Delete
[942] Fix | Delete
// MOD - audio - MODule (ScreamTracker)
[943] Fix | Delete
's3m' => array(
[944] Fix | Delete
'pattern' => '^.{44}SCRM',
[945] Fix | Delete
'group' => 'audio',
[946] Fix | Delete
'module' => 'mod',
[947] Fix | Delete
//'option' => 's3m',
[948] Fix | Delete
'mime_type' => 'audio/s3m',
[949] Fix | Delete
),
[950] Fix | Delete
[951] Fix | Delete
// MPC - audio - Musepack / MPEGplus
[952] Fix | Delete
'mpc' => array(
[953] Fix | Delete
'pattern' => '^(MPCK|MP\\+|[\\x00\\x01\\x10\\x11\\x40\\x41\\x50\\x51\\x80\\x81\\x90\\x91\\xC0\\xC1\\xD0\\xD1][\\x20-\\x37][\\x00\\x20\\x40\\x60\\x80\\xA0\\xC0\\xE0])',
[954] Fix | Delete
'group' => 'audio',
[955] Fix | Delete
'module' => 'mpc',
[956] Fix | Delete
'mime_type' => 'audio/x-musepack',
[957] Fix | Delete
),
[958] Fix | Delete
[959] Fix | Delete
// MP3 - audio - MPEG-audio Layer 3 (very similar to AAC-ADTS)
[960] Fix | Delete
'mp3' => array(
[961] Fix | Delete
'pattern' => '^\\xFF[\\xE2-\\xE7\\xF2-\\xF7\\xFA-\\xFF][\\x00-\\x0B\\x10-\\x1B\\x20-\\x2B\\x30-\\x3B\\x40-\\x4B\\x50-\\x5B\\x60-\\x6B\\x70-\\x7B\\x80-\\x8B\\x90-\\x9B\\xA0-\\xAB\\xB0-\\xBB\\xC0-\\xCB\\xD0-\\xDB\\xE0-\\xEB\\xF0-\\xFB]',
[962] Fix | Delete
'group' => 'audio',
[963] Fix | Delete
'module' => 'mp3',
[964] Fix | Delete
'mime_type' => 'audio/mpeg',
[965] Fix | Delete
),
[966] Fix | Delete
[967] Fix | Delete
// OFR - audio - OptimFROG
[968] Fix | Delete
'ofr' => array(
[969] Fix | Delete
'pattern' => '^(\\*RIFF|OFR)',
[970] Fix | Delete
'group' => 'audio',
[971] Fix | Delete
'module' => 'optimfrog',
[972] Fix | Delete
'mime_type' => 'application/octet-stream',
[973] Fix | Delete
),
[974] Fix | Delete
[975] Fix | Delete
// RKAU - audio - RKive AUdio compressor
[976] Fix | Delete
'rkau' => array(
[977] Fix | Delete
'pattern' => '^RKA',
[978] Fix | Delete
'group' => 'audio',
[979] Fix | Delete
'module' => 'rkau',
[980] Fix | Delete
'mime_type' => 'application/octet-stream',
[981] Fix | Delete
),
[982] Fix | Delete
[983] Fix | Delete
// SHN - audio - Shorten
[984] Fix | Delete
'shn' => array(
[985] Fix | Delete
'pattern' => '^ajkg',
[986] Fix | Delete
'group' => 'audio',
[987] Fix | Delete
'module' => 'shorten',
[988] Fix | Delete
'mime_type' => 'audio/xmms-shn',
[989] Fix | Delete
'fail_id3' => 'ERROR',
[990] Fix | Delete
'fail_ape' => 'ERROR',
[991] Fix | Delete
),
[992] Fix | Delete
[993] Fix | Delete
// TAK - audio - Tom's lossless Audio Kompressor
[994] Fix | Delete
'tak' => array(
[995] Fix | Delete
'pattern' => '^tBaK',
[996] Fix | Delete
'group' => 'audio',
[997] Fix | Delete
'module' => 'tak',
[998] Fix | Delete
'mime_type' => 'application/octet-stream',
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function