Delete releases that report missing, broken or empty nzbs on PPA stage

This commit is contained in:
DariusIII
2019-03-14 15:02:22 +01:00
parent ae4e3e80b9
commit fdd04d1018
2 changed files with 7 additions and 6 deletions
@@ -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);
+1
View File
@@ -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