summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-03-03 10:22:54 +0000
committerCarl Hetherington <cth@carlh.net>2017-03-03 10:22:54 +0000
commit1f726f889fb4e590ec20a8ea8682d14e267ee6f1 (patch)
tree41a435574308124e6585a530bc040f870026a55e /src
parent6804202a0fca083ebbbe5a5515b98a42f98c545d (diff)
Allow import of DCPs as content from the command line again.
Diffstat (limited to 'src')
-rw-r--r--src/tools/dcpomatic.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 2b6a62f11..19e770718 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -61,6 +61,7 @@
#include "lib/cinema_kdms.h"
#include "lib/dcpomatic_socket.h"
#include "lib/hints.h"
+#include "lib/dcp_content.h"
#include <dcp/exceptions.h>
#include <dcp/raw_convert.h>
#include <wx/generic/aboutdlgg.h>
@@ -1005,7 +1006,8 @@ private:
static const wxCmdLineEntryDesc command_line_description[] = {
{ wxCMD_LINE_SWITCH, "n", "new", "create new film", wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
- { wxCMD_LINE_OPTION, "c", "content", "add content file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
+ { wxCMD_LINE_OPTION, "c", "content", "add content file / directory", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
+ { wxCMD_LINE_OPTION, "d", "dcp", "add content DCP", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_PARAM, 0, 0, "film to load or create", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
};
@@ -1103,6 +1105,9 @@ private:
_frame->film()->examine_and_add_content (i);
}
}
+ if (!_dcp_to_add.empty ()) {
+ _frame->film()->examine_and_add_content (shared_ptr<DCPContent> (new DCPContent (_frame->film(), _dcp_to_add)));
+ }
}
signal_manager = new wxSignalManager (this);
@@ -1145,6 +1150,11 @@ private:
_content_to_add = wx_to_std (content);
}
+ wxString dcp;
+ if (parser.Found (wxT ("dcp"), &dcp)) {
+ _dcp_to_add = wx_to_std (dcp);
+ }
+
return true;
}
@@ -1211,6 +1221,7 @@ private:
string _film_to_load;
string _film_to_create;
string _content_to_add;
+ string _dcp_to_add;
};
IMPLEMENT_APP (App)