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); return $image->valid() ? $image : $this->getNoCoverThumbnail($maxX, $maxY); } public function getNoCoverThumbnail($maxX, $maxY) { $image = new \OC_Image(); return $image; } } \OC\Preview::registerProvider('OC\Preview\MP3');