mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Show messages only if echoing to cli is enabled
This commit is contained in:
@@ -635,7 +635,9 @@ class ProcessAdditional
|
||||
if ($nzbPath !== false) {
|
||||
$nzbContents = Utility::unzipGzipFile($nzbPath);
|
||||
if (! $nzbContents) {
|
||||
$this->_echo('NZB is empty or broken for GUID: '.$this->_release->guid, 'warning');
|
||||
if ($this->_echoCLI) {
|
||||
$this->_echo('NZB is empty or broken for GUID: '.$this->_release->guid, 'warning');
|
||||
}
|
||||
$this->_deleteRelease();
|
||||
|
||||
return false;
|
||||
@@ -643,7 +645,9 @@ class ProcessAdditional
|
||||
// Get a list of files in the nzb.
|
||||
$this->_nzbContents = $this->_nzb->nzbFileList($nzbContents, ['no-file-key' => false, 'strip-count' => true]);
|
||||
if (\count($this->_nzbContents) === 0) {
|
||||
$this->_echo('NZB is potentially broken for GUID: '.$this->_release->guid, 'warning');
|
||||
if ($this->_echoCLI) {
|
||||
$this->_echo('NZB is potentially broken for GUID: '.$this->_release->guid, 'warning');
|
||||
}
|
||||
$this->_deleteRelease();
|
||||
|
||||
return false;
|
||||
@@ -653,7 +657,9 @@ class ProcessAdditional
|
||||
|
||||
return true;
|
||||
}
|
||||
$this->_echo('NZB not found for GUID: '.$this->_release->guid, 'warning');
|
||||
if ($this->_echoCLI) {
|
||||
$this->_echo('NZB not found for GUID: '.$this->_release->guid, 'warning');
|
||||
}
|
||||
$this->_deleteRelease();
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user