make mp3 backend work with encryption
This commit is contained in:
parent
4d52dfb0a0
commit
738cc48a85
|
@ -15,11 +15,16 @@ class OC_Preview_MP3 extends OC_Preview_Provider{
|
|||
|
||||
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
|
||||
$getID3 = new getID3();
|
||||
|
||||
$tmppath = $fileview->toTmpFile($path);
|
||||
|
||||
//Todo - add stream support
|
||||
$tags = $getID3->analyze($fileview->getLocalFile($path));
|
||||
$tags = $getID3->analyze($tmppath);
|
||||
getid3_lib::CopyTagsToComments($tags);
|
||||
$picture = @$tags['id3v2']['APIC'][0]['data'];
|
||||
|
||||
unlink($tmppath);
|
||||
|
||||
$image = new \OC_Image($picture);
|
||||
if (!$image->valid()) return $this->getNoCoverThumbnail($maxX, $maxY);
|
||||
|
||||
|
|
Loading…
Reference in New Issue