X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_cli.cc;h=7fc5ed55dd9603d702eb4496adf6b37649b73629;hb=55921ca13c8d8c4f4810f5c89d4f347977613cfb;hp=31681a7fca7c7e9341f89b0cba2dd7ee041e7dad;hpb=5209385eefbee08d19080e998c785c8efe8b84d2;p=dcpomatic.git diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc index 31681a7fc..7fc5ed55d 100644 --- a/src/tools/dcpomatic_cli.cc +++ b/src/tools/dcpomatic_cli.cc @@ -65,6 +65,7 @@ help (string n) << " -s, --servers specify servers to use in a text file\n" << " -l, --list-servers just display a list of encoding servers that DCP-o-matic is configured to use; don't encode\n" << " -d, --dcp-path echo DCP's path to stdout on successful completion (implies -n)\n" + << " -c, --config directory containing config.xml and cinemas.xml\n" << " --dump just dump a summary of the film's settings; don't encode\n" << "\n" << " is the film directory.\n"; @@ -121,7 +122,7 @@ list_servers () { while (true) { int N = 0; - list servers = EncodeServerFinder::instance()->servers (); + list servers = EncodeServerFinder::instance()->servers(); /* This is a bit fiddly because we want to list configured servers that are down as well as all those (configured and found by broadcast) that are up. @@ -144,7 +145,7 @@ list_servers () optional threads; list::iterator j = servers.begin (); while (j != servers.end ()) { - if (i == j->host_name()) { + if (i == j->host_name() && j->current_link_version()) { threads = j->threads(); list::iterator tmp = j; ++tmp; @@ -164,7 +165,11 @@ list_servers () /* Now report any left that have been found by broadcast */ BOOST_FOREACH (EncodeServerDescription const & i, servers) { - cout << std::left << setw(24) << i.host_name() << " UP " << i.threads() << "\n"; + if (i.current_link_version()) { + cout << std::left << setw(24) << i.host_name() << " UP " << i.threads() << "\n"; + } else { + cout << std::left << setw(24) << i.host_name() << " bad version\n"; + } ++N; } } @@ -191,6 +196,7 @@ main (int argc, char* argv[]) optional servers; bool list_servers_ = false; bool dcp_path = false; + optional config; int option_index = 0; while (true) { @@ -206,12 +212,13 @@ main (int argc, char* argv[]) { "servers", required_argument, 0, 's' }, { "list-servers", no_argument, 0, 'l' }, { "dcp-path", no_argument, 0, 'd' }, + { "config", required_argument, 0, 'c' }, /* Just using A, B, C ... from here on */ { "dump", no_argument, 0, 'A' }, { 0, 0, 0, 0 } }; - int c = getopt_long (argc, argv, "vhfnrt:j:kAs:ld", long_options, &option_index); + int c = getopt_long (argc, argv, "vhfnrt:j:kAs:ldc:", long_options, &option_index); if (c == -1) { break; @@ -255,9 +262,16 @@ main (int argc, char* argv[]) dcp_path = true; progress = false; break; + case 'c': + config = optarg; + break; } } + if (config) { + Config::override_path = *config; + } + if (servers) { FILE* f = fopen_boost (*servers, "r"); if (!f) {