diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 23:45:06 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 23:45:06 +0200 |
commit | fb28fadcf6e71b4b797aa4241436ec3add543ba0 (patch) | |
tree | 01b2e19338badfa89be45c8a90c4b391b8cd6119 /fetcher/feedfetcher.php | |
parent | 976cd93e3c9aef7734792ba6b53f15621c5b6c91 (diff) |
get rid of faviconfetcher and use picofeed
Diffstat (limited to 'fetcher/feedfetcher.php')
-rw-r--r-- | fetcher/feedfetcher.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php index c658dd36c..68036cc95 100644 --- a/fetcher/feedfetcher.php +++ b/fetcher/feedfetcher.php @@ -13,6 +13,8 @@ namespace OCA\News\Fetcher; +use \PicoFeed\Favicon; + use \OCA\News\Db\Item; use \OCA\News\Db\Feed; use \OCA\News\Utility\FaviconFetcher; @@ -35,13 +37,13 @@ class FeedFetcher implements IFeedFetcher { private $appConfig; public function __construct(SimplePieAPIFactory $simplePieFactory, - FaviconFetcher $faviconFetcher, + Favicon $faviconFetcher, $time, $cacheDirectory, Config $config, AppConfig $appConfig){ $this->cacheDirectory = $cacheDirectory; - $this->cacheDuration = $config->getSimplePieCacheDuration(); + $this->cacheDuration = $config->getCacheDuration(); $this->fetchTimeout = $config->getFeedFetcherTimeout(); $this->faviconFetcher = $faviconFetcher; $this->simplePieFactory = $simplePieFactory; @@ -211,7 +213,7 @@ class FeedFetcher implements IFeedFetcher { if ($getFavicon) { // use the favicon from the page first since most feeds use a weird // image - $favicon = $this->faviconFetcher->fetch($feed->getLink()); + $favicon = $this->faviconFetcher->find($feed->getLink()); if (!$favicon) { $favicon = $simplePieFeed->get_image_url(); |