diff --git a/Blacklight/processing/post/ProcessAdditional.php b/Blacklight/processing/post/ProcessAdditional.php index 1858ee0df..39bbb837c 100755 --- a/Blacklight/processing/post/ProcessAdditional.php +++ b/Blacklight/processing/post/ProcessAdditional.php @@ -809,24 +809,24 @@ class ProcessAdditional { $nzbPath = $this->_nzb->NZBPath($this->_release->guid); if ($nzbPath === false) { - $this->_echo('NZB not found for GUID: '.$this->_release->guid, 'warning'); + $this->_echo('NZB not found for GUID: '.$this->_release->guid . ', deleting the release.', 'warning'); - return $this->_decrementPasswordStatus(); + Release::query()->where('guid', $this->_release->guid)->delete(); } $nzbContents = Utility::unzipGzipFile($nzbPath); if (! $nzbContents) { - $this->_echo('NZB is empty or broken for GUID: '.$this->_release->guid, 'warning'); + $this->_echo('NZB is empty or broken for GUID: '.$this->_release->guid. ', deleting the release.', 'warning'); - return $this->_decrementPasswordStatus(); + Release::query()->where('guid', $this->_release->guid)->delete(); } // 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'); + $this->_echo('NZB is potentially broken for GUID: '.$this->_release->guid .'deleting the release.', 'warning'); - return $this->_decrementPasswordStatus(); + Release::query()->where('guid', $this->_release->guid)->delete(); } // Sort keys. ksort($this->_nzbContents, SORT_NATURAL); diff --git a/Changelog b/Changelog index 386dcd97f..4ff5371a5 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2019-03-14 DariusIII + * Chg: Delete releases that report missing, broken or empty nzbs on PPA stage * Fix: Fix resetting groups in admin area * Chg: Update package.json * Chg: Load category and parent relations when querying db