fix: breakage in generateAlbumCover

This commit is contained in:
Phan An 2020-12-23 14:26:33 +01:00
parent 094d07fad3
commit 858ee703c4

View file

@ -221,7 +221,7 @@ class FileSynchronizer
// If the album has no cover, we try to get the cover image from existing tag data // If the album has no cover, we try to get the cover image from existing tag data
if ($coverData) { if ($coverData) {
$extension = explode('/', $coverData['image_mime']); $extension = explode('/', $coverData['image_mime']);
$extension = $extension[1] ? 'png' : $extension[1]; $extension = $extension[1] ?? 'png';
$this->mediaMetadataService->writeAlbumCover($album, $coverData['data'], $extension); $this->mediaMetadataService->writeAlbumCover($album, $coverData['data'], $extension);