From a0d7e2778977360fe05027d336cec5e1d0d64dd3 Mon Sep 17 00:00:00 2001 From: UmbrellaCodr Date: Wed, 2 Feb 2022 22:21:58 -0800 Subject: reduce 'Movie preview generation failed Output' log errors for movies under 5 seconds Signed-off-by: UmbrellaCodr Update lib/private/Preview/Movie.php Co-authored-by: Simon L. --- lib/private/Preview/Movie.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/Preview/Movie.php b/lib/private/Preview/Movie.php index eab81e1ed48..a6e424caa2a 100644 --- a/lib/private/Preview/Movie.php +++ b/lib/private/Preview/Movie.php @@ -159,8 +159,10 @@ class Movie extends ProviderV2 { } } - $logger = \OC::$server->get(LoggerInterface::class); - $logger->error('Movie preview generation failed Output: {output}', ['app' => 'core', 'output' => $output]); + if ($second === 0) { + $logger = \OC::$server->get(LoggerInterface::class); + $logger->error('Movie preview generation failed Output: {output}', ['app' => 'core', 'output' => $output]); + } unlink($tmpPath); return null; -- cgit v1.2.3