toTmpFile($path); //Todo - add stream support $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; } public function getNoCoverThumbnail($maxX, $maxY) { $image = new \OC_Image(); return $image; } } \OC\Preview::registerProvider('OC\Preview\MP3');