diff --git a/view/img/image404.php b/view/img/image404.php index 4f6634a24a..7b5855e1a4 100644 --- a/view/img/image404.php +++ b/view/img/image404.php @@ -31,6 +31,23 @@ if (preg_match('/videos\/(.*\/)?(.*)_thumbs(V2)?.jpg/', $imageURL, $matches) && readfile($file); exit; } +}else if (preg_match('/videos\/(.*\/)?(.*)_roku.jpg/', $imageURL, $matches) && !empty($matches[2])) { + $jpg = Video::getPathToFile("{$matches[2]}.jpg"); + if (file_exists($jpg)) { + $file = $jpg; + if (preg_match('/_roku/', $imageURL)) { + _error_log("3 Image not found for {$imageURL} converting $jpg,{$global['systemRootPath']}{$imageURL} => Width = ".($advancedCustom->thumbsWidthPortrait / 2).", Height=".($advancedCustom->thumbsHeightPortrait/2)); + convertImageIfNotExists($jpg, $global['systemRootPath'] . $imageURL, $advancedCustom->thumbsWidthPortrait / 2, $advancedCustom->thumbsHeightPortrait / 2, true); + } else { + _error_log("4 Image not found for {$imageURL} we are using {$jpg} instead "); + } + $type = 'image/jpg'; + //header("HTTP/1.0 404 Not Found"); + header('Content-Type:' . $type); + header('Content-Length: ' . filesize($file)); + readfile($file); + exit; + } } if (empty($_GET['notFound'])) {