add command event:fire + fetch imdb when torrent created

This commit is contained in:
xiaomlove
2024-02-23 02:38:42 +08:00
parent 5c6a2b13f9
commit 9efa5b2ae5
12 changed files with 227 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-02-22');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-02-23');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");

View File

@@ -1192,9 +1192,14 @@ function executeCommand($command, $format = 'string', $artisan = false, $excepti
do_log("command: $command");
$result = exec($command, $output, $result_code);
$outputString = implode("\n", $output);
do_log(sprintf('result_code: %s, result: %s, output: %s', $result_code, $result, $outputString));
if ($exception && $result_code != 0) {
throw new \RuntimeException($outputString);
$log = sprintf('result_code: %s, result: %s, output: %s', $result_code, $result, $outputString);
if ($result_code != 0) {
do_log($log, "error");
if ($exception) {
throw new \RuntimeException($outputString);
}
} else {
do_log($log);
}
return $format == 'string' ? $outputString : $output;
}