From b527f0ebafc8567dbde13a9ced5c24d0607b530d Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Wed, 15 Oct 2014 19:54:30 +0200 Subject: [PATCH] Add extra file extensions to image and video path filters --- src/MediaServer/DirectoryWatcher.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/MediaServer/DirectoryWatcher.h b/src/MediaServer/DirectoryWatcher.h index a224666..e057b0a 100644 --- a/src/MediaServer/DirectoryWatcher.h +++ b/src/MediaServer/DirectoryWatcher.h @@ -29,7 +29,8 @@ class VideoPathFilter : public BasePathFilter { // TODO: Find useful filters e.g. *.mp4, etc bool accept(const Poco::Path& path) const { return !Poco::File(path).isHidden() && - ofIsStringInString(path.toString(), "mp4"); + (ofIsStringInString(path.toString(), ".mp4") || + ofIsStringInString(path.toString(), ".h264")); } }; @@ -41,7 +42,9 @@ class ImagePathFilter : public BasePathFilter { // TODO: Find useful filters e.g. *.png,*.jpeg, etc. bool accept(const Poco::Path& path) const { return !Poco::File(path).isHidden() && - ofIsStringInString(path.toString(), "png"); + (ofIsStringInString(path.toString(), ".png") || + ofIsStringInString(path.toString(), ".jpg") || + ofIsStringInString(path.toString(), ".jpeg")); } };