use Shaarli\Config\ConfigManager;
use WebThumbnailer\Application\ConfigManager as WTConfigManager;
-use WebThumbnailer\Exception\WebThumbnailerException;
use WebThumbnailer\WebThumbnailer;
/**
'instagram.com',
'pinterest.com',
'pinterest.fr',
+ 'soundcloud.com',
'tumblr.com',
'deviantart.com',
];
$this->conf = $conf;
if (! $this->checkRequirements()) {
- $this->conf->set('thumbnails.enabled', false);
+ $this->conf->set('thumbnails.mode', Thumbnailer::MODE_NONE);
$this->conf->write(true);
// TODO: create a proper error handling system able to catch exceptions...
die(t(
try {
return $this->wt->thumbnail($url);
- } catch (WebThumbnailerException $e) {
+ } catch (\Throwable $e) {
// Exceptions are only thrown in debug mode.
error_log(get_class($e) . ': ' . $e->getMessage());
}