X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FHelper%2FContentProxy.php;h=bbad705fa9bb05561d25cddb93a64b8cc16b92f5;hb=419214d7221e0821ef2b73eb2b3db816ed0cf173;hp=8019df42a6c51bd642c78074f6eceb6ec0e91657;hpb=d6de23a100221ae1afaa92a58af17a17d0c6614e;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 8019df42..bbad705f 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -65,7 +65,7 @@ class ContentProxy $entry->setUrl($content['url'] ?: $url); $entry->setTitle($title); - $entry->setContent($html); + $entry->setLanguage($content['language']); $entry->setMimetype($content['content_type']); $entry->setReadingTime(Utils::getReadingTime($html)); @@ -75,6 +75,14 @@ class ContentProxy $entry->setDomainName($domainName); } + if (true) { + $this->logger->log('debug','Starting to download images'); + $downloadImages = new DownloadImages($html, $url, $this->logger); + $html = $downloadImages->process(); + } + + $entry->setContent($html); + if (isset($content['open_graph']['og_image'])) { $entry->setPreviewPicture($content['open_graph']['og_image']); }