mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-02 11:18:56 +00:00
Added magic numbers support.
This commit is contained in:
@@ -1212,23 +1212,17 @@ Class ProcessAdditional
|
||||
) {
|
||||
$this->_processVideoFile($file);
|
||||
} // Check if it's alt.binaries.u4e file.
|
||||
else if (in_array($this->_releaseGroupName, array('alt.binaries.u4e', 'alt.binaries.mom')) &&
|
||||
else if (in_array($this->_releaseGroupName, ['alt.binaries.u4e', 'alt.binaries.mom']) &&
|
||||
preg_match('/Linux_2rename\.sh/i', $file) &&
|
||||
($this->_release['categoryID'] == \Category::CAT_MISC_HASHED || $this->_release['categoryID'] == \Category::CAT_MISC_OTHER)
|
||||
) {
|
||||
$this->_processU4ETitle($file);
|
||||
} // If we have GNU file, check the type of file and process it.
|
||||
else if ($this->_hasGNUFile) {
|
||||
exec('file -b "' . $file . '"', $output);
|
||||
|
||||
}
|
||||
// Check file's magic info.
|
||||
else {
|
||||
$output = Utility::fileInfo($file);
|
||||
if (!empty($output)) {
|
||||
|
||||
if (count($output) > 1) {
|
||||
$output = implode(',', $output);
|
||||
} else {
|
||||
$output = $output[0];
|
||||
}
|
||||
|
||||
switch (true) {
|
||||
|
||||
case ($this->_foundJPGSample === false && preg_match('/^JPE?G/i', $output[0])):
|
||||
|
||||
Reference in New Issue
Block a user