Skip to content

Commit

Permalink
Merge pull request #30984 from UmbrellaCodr/ffmpeg-preview
Browse files Browse the repository at this point in the history
reduce 'Movie preview generation failed Output' log errors
  • Loading branch information
szaimen authored Feb 4, 2022
2 parents 50f51b1 + a0d7e27 commit 88ded73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/private/Preview/Movie.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ private function generateThumbNail($maxX, $maxY, $absPath, $second): ?IImage {
}
}

$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;
Expand Down

0 comments on commit 88ded73

Please sign in to comment.