Merge pull request #91 from mmn/generate_thumbnail_if_it_doesnt_exist
Generate thumbnail if it doesn't exist
This commit is contained in:
commit
82b60317c5
|
@ -484,11 +484,9 @@ class QvitterPlugin extends Plugin {
|
|||
foreach ($attachments as $attachment) {
|
||||
try {
|
||||
$enclosure_o = $attachment->getEnclosure();
|
||||
$thumb = File_thumbnail::getKV('file_id', $attachment->id);
|
||||
if(isset($thumb->url)) {
|
||||
$attachment_url_to_id[$enclosure_o->url]['id'] = $attachment->id;
|
||||
$attachment_url_to_id[$enclosure_o->url]['thumb_url'] = $thumb->url;
|
||||
}
|
||||
$thumb = $attachment->getThumbnail();
|
||||
$attachment_url_to_id[$enclosure_o->url]['id'] = $attachment->id;
|
||||
$attachment_url_to_id[$enclosure_o->url]['thumb_url'] = $thumb->getUrl();
|
||||
} catch (ServerException $e) {
|
||||
// There was not enough metadata available
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user