try getting thumb url from db if getthumbnail fails #91

This commit is contained in:
Hannes Mannerheim 2015-01-26 01:47:45 +01:00
parent 82b60317c5
commit 139017332e

View File

@ -488,7 +488,11 @@ class QvitterPlugin extends Plugin {
$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
$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;
}
}
}
}