mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 22:27:31 -04:00
feat: log file id and path when extracting the mp3 cover fails
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
949a634a26
commit
37454eb200
1 changed files with 4 additions and 4 deletions
|
|
@ -9,8 +9,8 @@ namespace OC\Preview;
|
|||
|
||||
use OCP\Files\File;
|
||||
use OCP\IImage;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use wapmorgan\Mp3Info\Mp3Info;
|
||||
use function OCP\Log\logger;
|
||||
|
||||
class MP3 extends ProviderV2 {
|
||||
/**
|
||||
|
|
@ -31,9 +31,9 @@ class MP3 extends ProviderV2 {
|
|||
/** @var string|null|false $picture */
|
||||
$picture = $audio->getCover();
|
||||
} catch (\Throwable $e) {
|
||||
\OC::$server->get(LoggerInterface::class)->info($e->getMessage(), [
|
||||
'exception' => $e,
|
||||
'app' => 'core',
|
||||
logger('core')->info('Error while getting cover from mp3 file: ' . $e->getMessage(), [
|
||||
'fileId' => $file->getId(),
|
||||
'filePath' => $file->getPath(),
|
||||
]);
|
||||
return null;
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Reference in a new issue