From 093656747b606be7c36a3fc0705dd793130ac6b1 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 29 Mar 2022 15:26:22 +0200 Subject: [PATCH] wip #5184 @0.25 --- app/Http/Controllers/FrontController.php | 2 +- app/Jobs/SearchIndex.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/FrontController.php b/app/Http/Controllers/FrontController.php index 4b89945..52d96f8 100644 --- a/app/Http/Controllers/FrontController.php +++ b/app/Http/Controllers/FrontController.php @@ -115,7 +115,7 @@ class FrontController extends Controller 'title' => $a->get('title'), 'file' => $a->getImageURLbyCollection($a->get('file_upload')), 'image' => $a->getImageURLbyCollection($a->get('file_thumb')) ?? $a->getImageURLbyCollection($a->get('file_upload'), 'poster'), - 'duration' => Cache::get('media_duration_' . Files::hashFileAttributes($file), function () use ($ffprobe, $file) { + 'duration' => Cache::remember('media_duration_' . Files::hashFileAttributes($file), 85400, function () use ($ffprobe, $file) { return $ffprobe->format($file)->get('duration'); }) ]; diff --git a/app/Jobs/SearchIndex.php b/app/Jobs/SearchIndex.php index 3f71a8a..aa3a2cf 100644 --- a/app/Jobs/SearchIndex.php +++ b/app/Jobs/SearchIndex.php @@ -75,7 +75,7 @@ class SearchIndex extends Index $pdfs = Asset::getPDFInResources(); foreach ($pdfs as $pdf) { $file = $pdf->getFirstMediaInField('file_upload'); - if (null===$file) { + if (null === $file) { throw new \Exception('Aucun fichier dans l\'asset ' . $pdf->id); } $document = new PDF($file->getPath()); -- 2.39.5