Browse Source

Add extra file extensions to image and video path filters

master
Krisjanis Rijnieks 11 years ago
parent
commit
b527f0ebaf
  1. 7
      src/MediaServer/DirectoryWatcher.h

7
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"));
}
};

Loading…
Cancel
Save