X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic.cc;h=92de9a1f0a0d3d49d4720abc2a466977a5707f3e;hp=d091512a04a94eed1073d43bf5a99b6570abaaa2;hb=e340b96b4a33725e70e3703b0c60ba8da95bca3b;hpb=443a7d74ff2a49ad45a4fb44f92abd619bc0a0b0 diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index d091512a0..92de9a1f0 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 #include #include @@ -1029,7 +1030,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 } }; @@ -1127,6 +1129,9 @@ private: _frame->film()->examine_and_add_content (i); } } + if (!_dcp_to_add.empty ()) { + _frame->film()->examine_and_add_content (shared_ptr (new DCPContent (_frame->film(), _dcp_to_add))); + } } signal_manager = new wxSignalManager (this); @@ -1169,6 +1174,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; } @@ -1235,6 +1245,7 @@ private: string _film_to_load; string _film_to_create; string _content_to_add; + string _dcp_to_add; }; IMPLEMENT_APP (App)