NNTmux / newznab-tmux

Laravel based usenet indexer
GNU General Public License v3.0
210 stars 52 forks source link

Undefined offset: 0 at Blacklight/processing/post/ProcessAdditional.php:924 #1169

Closed ghost closed 3 years ago

ghost commented 3 years ago
   ErrorException                                                                                                                                                                                                                                                   [190/2990]

  Undefined offset: 0

  at Blacklight/processing/post/ProcessAdditional.php:924
    920|             if ($this->_processAudioInfo && empty($this->_AudioInfoMessageIDs) && preg_match('/'.$this->_audioFileRegex.'[. ")\]]/i', $this->_currentNZBFile['title'], $type) && isset($this->_currentNZBFile['segments'])
    921|             ) {
    922|                 // Get the extension.
    923|                 $this->_AudioInfoExtension = $type[1];
  > 924|                 $this->_AudioInfoMessageIDs = (string) $this->_currentNZBFile['segments'][0];
    925|             }
    926|
    927|             // Some releases contain many books, increment this to ignore them later.
    928|             if (preg_match($this->_ignoreBookRegex, $this->_currentNZBFile['title'])) {

  1   Blacklight/processing/post/ProcessAdditional.php:924
      Illuminate\Foundation\Bootstrap\HandleExceptions::handleError()

  2   Blacklight/processing/post/ProcessAdditional.php:714
      Blacklight\processing\post\ProcessAdditional::_processNZBContents()

Been getting these for a while during PPA.

ghost commented 3 years ago

Got it, it is looking for segments in the NZB but the NZB is empty for some reason.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nzb
PUBLIC "-//newzBin//DTD NZB 1.1//EN"
       "http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd">
<nzb xmlns="http://www.newzbin.com/DTD/2003/nzb">
  <head>
    <meta type="name">[05/39] - &quot;01-br1an--ambitious-oma.mp3&quot; yEnc</meta>
  </head>
  <file poster="ZngYUPF1PwN-Cat &lt;eager-poster@computer&gt;" date="1623262604" subject="[05/39] - &quot;01-br1an--ambitious-oma.mp3&quot; yEnc(1/11)">
    <groups>
      <group>alt.binaries.misc</group>
    </groups>
    <segments/>
  </file>
</nzb>