Commit 738cc48a authored by Georg Ehrke's avatar Georg Ehrke
Browse files

make mp3 backend work with encryption

parent 4d52dfb0
......@@ -14,15 +14,20 @@ class OC_Preview_MP3 extends OC_Preview_Provider{
}
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
$getID3 = new getID3();
$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);
return $image;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment