Update code

This commit is contained in:
DariusIII
2025-04-29 12:56:52 +02:00
parent 8a41a6d05b
commit 3390e84d32
3 changed files with 412 additions and 248 deletions
@@ -1949,13 +1949,18 @@ class ProcessAdditional
}
/**
* @throws \Exception
* @throws \Exception Potentially thrown by addAlternateNfo
*/
protected function _processNfoFile($fileLocation): void
protected function _processNfoFile(string $fileLocation): void
{
$data = @File::get($fileLocation);
if ($data != false && $this->_nfo->isNFO($data, $this->_release->guid) && $this->_nfo->addAlternateNfo($data, $this->_release, $this->_nntp)) {
$this->_releaseHasNoNFO = false;
try {
$data = File::get($fileLocation);
if ($this->_nfo->isNFO($data, $this->_release->guid) && $this->_nfo->addAlternateNfo($data, $this->_release, $this->_nntp)) {
$this->_releaseHasNoNFO = false;
}
} catch (FileNotFoundException $e) {
// Log or handle the case where the file doesn't exist or isn't readable
Log::warning("Could not read potential NFO file: {$fileLocation} - {$e->getMessage()}");
}
}