Update config values

This commit is contained in:
DariusIII
2025-05-14 14:43:51 +02:00
parent 34d2a48564
commit f66bb790dd
3 changed files with 11 additions and 4 deletions
+1
View File
@@ -160,6 +160,7 @@ TEMP_UNZIP_PATH='/var/www/nntmux/resources/tmp/unzip/'
VIEW_COMPILED_PATH=/var/www/NNTmux/storage/framework/views
UNRAR_PATH=
UNZIP_PATH=
S7ZIP_PATH=
PATH_TO_NZBS=
FFMPEG_PATH=
LAME_PATH=
@@ -80,6 +80,10 @@ class ProcessAdditional
*/
protected mixed $_unrarPath;
protected mixed $_unzipPath;
protected mixed $_7zipPath;
protected string $_killString;
protected string|bool $_showCLIReleaseID;
@@ -283,11 +287,12 @@ class ProcessAdditional
$this->_maxNestedLevels = (int) Settings::settingValue('maxnestedlevels') === 0 ? 3 : (int) Settings::settingValue('maxnestedlevels');
$this->_extractUsingRarInfo = (int) Settings::settingValue('extractusingrarinfo') !== 0;
$this->_fetchLastFiles = (int) Settings::settingValue('archive.fetch.end') !== 0;
$this->_unrarPath = false;
$this->_unrarPath = config('nntmux_settings.unrar_path');
$this->_unzipPath = config('nntmux_settings.unzip_path');
$this->_7zipPath = config('nntmux_settings.7zip_path');
// Pass the binary extractors to ArchiveInfo.
$clients = [];
$this->_unrarPath = config('nntmux_settings.unrar_path');
$clients += [ArchiveInfo::TYPE_RAR => $this->_unrarPath];
$this->_archiveInfo->setExternalClients($clients);
@@ -928,7 +933,7 @@ class ProcessAdditional
$fileName = $this->tmpPath.uniqid('', true).'.zip';
File::put($fileName, $compressedData);
// Use the unzip command instead of 7zip
runCmd('unzip -o "'.$fileName.'" -d "'.$this->tmpPath.'unzip/"');
runCmd($this->_unzipPath.' -o "'.$fileName.'" -d "'.$this->tmpPath.'unzip/"');
File::delete($fileName);
}
break;
+2 -1
View File
@@ -2,7 +2,8 @@
return [
'unrar_path' => env('UNRAR_PATH', '/usr/bin/unrar'),
'unzip_path' => env('UNZIP_PATH', '/usr/bin/7z'),
'unzip_path' => env('UNZIP_PATH', '/usr/bin/unzip'),
'7zip_path' => env('S7ZIP_PATH', '/usr/bin/7z'),
'check_passworded_rars' => env('CHECK_PASSWORDED_RARS', false),
'delete_passworded_releases' => env('DELETE_PASSWORDED_RELEASES', false),
'delete_possible_passworded_releases' => env('DELETE_POSSIBLE_PASSWORDED_RELEASES', false),