Fix cover retrieval

Signed-off-by: Markus Birth <markus@birth-online.de>
This commit is contained in:
Markus Birth 2024-05-27 13:05:30 +01:00
parent 3699fd5ecb
commit 120617847c

View File

@ -246,13 +246,10 @@ class Mp3Info {
return null; return null;
} }
$fp = fopen($this->_fileName, 'rb'); $curPos = $this->fileObj->getFilePos();
if ($fp === false) { $this->fileObj->seekTo($this->coverProperties['offset']);
return false;
}
fseek($fp, $this->coverProperties['offset']);
$data = $this->fileObj->getBytes($this->coverProperties['size']); $data = $this->fileObj->getBytes($this->coverProperties['size']);
fclose($fp); $this->fileObj->seekTo($curPos);
return $data; return $data;
} }