NNTmux / newznab-tmux

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

Postprocess error exception #1368

Closed blimeybloke closed 1 year ago

blimeybloke commented 1 year ago

When I run postprocess in tmux or via command, every once in awhile I get a few releases that give an error. I need to manually delete the release from the release table or the error never goes away. I am attaching a screenshot of a few. I was wondering if I can add something simple to the code in processadditional.php that would simply delete the releaseID for me? SCR-20230713-nhdr SCR-20230715-nkoe SCR-20230716-kxul

So basically, just trying to figure out where I can add something like: $this->_deleteRelease(); or similar to just delete the release, so that the next time postprocess runs, it does not encounter that release.

DariusIII commented 1 year ago

Could you do a dd($rarFileName); before lines 1117 and 1124?

blimeybloke commented 1 year ago

Sorry, edited. Not sure what to put before the return false; ? thanks

DariusIII commented 1 year ago

If you do dd(), no need to put anything there. I need example to see why is the code failing.

blimeybloke commented 1 year ago

Do you mean this example?

` // Check if the compressed file is encrypted. if (! empty($this->_archiveInfo->isEncrypted) || (isset($dataSummary['is_encrypted']) && (int) $dataSummary['is_encrypted'] !== 0)) { if (config('app.debug') === true) { $this->_debug('ArchiveInfo: Compressed file has a password.'); } $this->_releaseHasPassword = true; $this->_passwordStatus = Releases::PASSWD_RAR;

        return false;

    }

    if ($this->_reverse) {
        $fileData = $dataSummary['file_list'] ?? [];
        $rarFileName = Arr::pluck($fileData, 'name');
        if (preg_match(NameFixer::PREDB_REGEX, $rarFileName[0], $hit)) {
            $preCheck = Predb::whereTitle($hit[0])->first();
            $this->_release->preid = $preCheck !== null ? $preCheck->value('id') : 0;
            (new NameFixer())->updateRelease($this->_release, $preCheck->title ?? ucwords($hit[0], '.'), 'RarInfo FileName Match', true, 'Filenames, ', 1, true, $this->_release->preid);
        } elseif (! empty($dataSummary['archives']) && ! empty($dataSummary['archives'][$rarFileName[0]]['file_list'])) {
            $archiveData = $dataSummary['archives'][$rarFileName[0]]['file_list'];
            $archiveFileName = Arr::pluck($archiveData, 'name');
            if (preg_match(NameFixer::PREDB_REGEX, $archiveFileName[0], $match2)) {
                $preCheck = Predb::whereTitle($match2[0])->first();
                $this->_release->preid = $preCheck !== null ? $preCheck->value('id') : 0;
                (new NameFixer())->updateRelease($this->_release, $preCheck->title ?? ucwords($match2[0], '.'), 'RarInfo FileName Match', true, 'Filenames, ', 1, true, $this->_release->preid);
            }
        }
    }                         `
DariusIII commented 1 year ago

Errors are triggered on on lines 1117 and 1124 in your screenshots. I need you to put line i wrote before on line before these. 1117 and 1124 are $rarFilename = ... put dd($rarFileName); before those lines.

blimeybloke commented 1 year ago

Ok, when I added it to the 1124 line, I get: [5228646][1.2GB](cB)(cB)(cB)(cB)array:1 [ 0 => "Office Tool Plus v10.1.10.1 x64.rar" ]

If I remove it, then I get the following from screenshot: SCR-20230716-mdft

DariusIII commented 1 year ago

Sorry for late reply. There is offset 0 in array so i don't know why is it complaining.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

blimeybloke commented 1 year ago

closed but not fixed. I had to do some custom magic and ignore to stop the system from crashing.