From 3ca7ed72c2f3a046e94213a8c26d80eafde9585c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 2 Apr 2021 23:29:33 +0200 Subject: FileManager: show video thumbnails, update thumbnail if name is the same but the content has changed (last modified time changed) --- src/plugins/FileManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/FileManager.cpp') diff --git a/src/plugins/FileManager.cpp b/src/plugins/FileManager.cpp index f65486e..f15deae 100644 --- a/src/plugins/FileManager.cpp +++ b/src/plugins/FileManager.cpp @@ -1,5 +1,5 @@ #include "../../plugins/FileManager.hpp" -#include "../../include/ImageUtils.hpp" +#include "../../include/FileAnalyzer.hpp" #include "../../include/QuickMedia.hpp" namespace QuickMedia { @@ -82,7 +82,8 @@ namespace QuickMedia { for(auto &p : paths) { auto body_item = BodyItem::create(p.path().filename().string()); // TODO: Check file magic number instead of extension? - if(p.is_regular_file() && is_image_ext(get_ext(p.path()))) { + const char *ext = get_ext(p.path()); + if(p.is_regular_file() && (is_image_ext(ext) || is_video_ext(ext))) { body_item->thumbnail_is_local = true; body_item->thumbnail_url = p.path().string(); } -- cgit v1.2.3