Fix last 3 errors

This commit is contained in:
Art4 2024-12-09 23:08:31 +00:00
parent cfb6b3123f
commit fff140ad43
3 changed files with 5 additions and 2 deletions

View file

@ -26,6 +26,7 @@ function tesseract_ocr_detection(&$media)
try {
$languages = $ocr->availableLanguages();
if ($languages) {
/** @phpstan-ignore-next-line ignore call of \thiagoalessio\TesseractOCR\Option::lang() */
$ocr->lang(implode('+', $languages));
}
$ocr->tempDir(System::getTempPath());
@ -33,5 +34,5 @@ function tesseract_ocr_detection(&$media)
$media['description'] = $ocr->run();
} catch (\Throwable $th) {
Logger::info('Error calling TesseractOCR', ['message' => $th->getMessage()]);
}
}
}