From: Carl Hetherington Date: Fri, 3 Mar 2017 10:22:54 +0000 (+0000) Subject: Allow import of DCPs as content from the command line again. X-Git-Tag: v2.11.1~152^2~2 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=1f726f889fb4e590ec20a8ea8682d14e267ee6f1 Allow import of DCPs as content from the command line again. --- 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 #include #include @@ -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 (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)