Don't try to send KDM email unless we have a from address.
[dcpomatic.git] / src / lib / content_factory.cc
index 9f88caf468a1c0b475803ce1032a557a2cb7d2f3..135f3fe5f5bb1da82dfbdfb16b908475b18b16f6 100644 (file)
@@ -50,6 +50,7 @@ using std::list;
 using std::make_shared;
 using std::shared_ptr;
 using std::string;
+using std::vector;
 
 
 /** Create a Content object from an XML node.
@@ -66,9 +67,6 @@ content_factory (cxml::ConstNodePtr node, int version, list<string>& notes)
        std::shared_ptr<Content> content;
 
        if (type == "FFmpeg") {
-               /* SndfileContent is now handled by the FFmpeg code rather than by
-                  separate libsndfile-based code.
-               */
                content = make_shared<FFmpegContent>(node, version, notes);
        } else if (type == "Image") {
                content = make_shared<ImageContent>(node, version);
@@ -88,7 +86,7 @@ content_factory (cxml::ConstNodePtr node, int version, list<string>& notes)
                        );
 
        } else if (type == "SubRip" || type == "TextSubtitle") {
-               content.reset (new StringTextFileContent(node, version));
+               content = make_shared<StringTextFileContent>(node, version, notes);
        } else if (type == "DCP") {
                content = make_shared<DCPContent>(node, version);
        } else if (type == "DCPSubtitle") {
@@ -107,10 +105,10 @@ content_factory (cxml::ConstNodePtr node, int version, list<string>& notes)
  *  @param path File or directory.
  *  @return Content objects.
  */
-list<shared_ptr<Content>>
+vector<shared_ptr<Content>>
 content_factory (boost::filesystem::path path)
 {
-       list<shared_ptr<Content>> content;
+       vector<shared_ptr<Content>> content;
 
        if (boost::filesystem::is_directory (path)) {