Try to improve detection of image sequence vs. DCP.
authorCarl Hetherington <cth@carlh.net>
Sun, 28 Feb 2016 12:26:44 +0000 (12:26 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 28 Feb 2016 12:26:44 +0000 (12:26 +0000)
ChangeLog
src/lib/content_factory.cc

index ab6fc737dd7da3cacb69fbed60a6f613101a7c8b..edabde9cbf5e82d7cd954bacea1c424a79e43b67 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-02-28  Carl Hetherington  <cth@carlh.net>
 
+       * Ignore subdirectories when deciding whether a folder
+       contains an image sequence or a DCP.
+
        * Updated nl_NL translation from Rob van Nieuwkerk.
 
 2016-02-27  Carl Hetherington  <cth@carlh.net>
index 2b17d69e42bdbd1525035eb479f79934b4d99ebe..911527384f90fc27e2afdaad069f21a5d9f96fcf 100644 (file)
@@ -96,7 +96,15 @@ content_factory (shared_ptr<const Film> film, boost::filesystem::path path)
                                continue;
                        }
 
-                       if (!boost::filesystem::is_regular_file (i->path()) || !valid_image_file (i->path())) {
+                       if (!boost::filesystem::is_regular_file(i->path())) {
+                               /* Ignore things which aren't files (probably directories) */
+                               continue;
+                       }
+
+                       if (!valid_image_file (i->path())) {
+                               /* We have a normal file which isn't an image; assume we are looking
+                                  at a DCP.
+                               */
                                is_dcp = true;
                        }