aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/visitor
diff options
context:
space:
mode:
Diffstat (limited to 'application/front/controller/visitor')
-rw-r--r--application/front/controller/visitor/BookmarkListController.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/application/front/controller/visitor/BookmarkListController.php b/application/front/controller/visitor/BookmarkListController.php
index 18368751..a8019ead 100644
--- a/application/front/controller/visitor/BookmarkListController.php
+++ b/application/front/controller/visitor/BookmarkListController.php
@@ -169,14 +169,11 @@ class BookmarkListController extends ShaarliVisitorController
169 */ 169 */
170 protected function updateThumbnail(Bookmark $bookmark, bool $writeDatastore = true): bool 170 protected function updateThumbnail(Bookmark $bookmark, bool $writeDatastore = true): bool
171 { 171 {
172 // Logged in, thumbnails enabled, not a note, is HTTP 172 // Logged in, not async retrieval, thumbnails enabled, and thumbnail should be updated
173 // and (never retrieved yet or no valid cache file)
174 if ($this->container->loginManager->isLoggedIn() 173 if ($this->container->loginManager->isLoggedIn()
174 && true !== $this->container->conf->get('general.enable_async_metadata', true)
175 && $this->container->conf->get('thumbnails.mode', Thumbnailer::MODE_NONE) !== Thumbnailer::MODE_NONE 175 && $this->container->conf->get('thumbnails.mode', Thumbnailer::MODE_NONE) !== Thumbnailer::MODE_NONE
176 && false !== $bookmark->getThumbnail() 176 && $bookmark->shouldUpdateThumbnail()
177 && !$bookmark->isNote()
178 && (null === $bookmark->getThumbnail() || !is_file($bookmark->getThumbnail()))
179 && startsWith(strtolower($bookmark->getUrl()), 'http')
180 ) { 177 ) {
181 $bookmark->setThumbnail($this->container->thumbnailer->get($bookmark->getUrl())); 178 $bookmark->setThumbnail($this->container->thumbnailer->get($bookmark->getUrl()));
182 $this->container->bookmarkService->set($bookmark, $writeDatastore); 179 $this->container->bookmarkService->set($bookmark, $writeDatastore);
@@ -198,6 +195,7 @@ class BookmarkListController extends ShaarliVisitorController
198 'page_max' => '', 195 'page_max' => '',
199 'search_tags' => '', 196 'search_tags' => '',
200 'result_count' => '', 197 'result_count' => '',
198 'async_metadata' => $this->container->conf->get('general.enable_async_metadata', true)
201 ]; 199 ];
202 } 200 }
203 201