From: Carl Hetherington Date: Thu, 6 Aug 2015 17:32:02 +0000 (+0100) Subject: Fix missing help and add a default name if none is specified. X-Git-Tag: v2.1.36~3 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=ad6a1f57b9f1eb0472bb4136d14856f9b4f3f2a6 Fix missing help and add a default name if none is specified. --- diff --git a/ChangeLog b/ChangeLog index c25abca68..48650392b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-08-06 Carl Hetherington + + * Make dcpomatic_create assign a default name if none + is specified. Fix dcpomatic_create help. + 2015-08-05 Carl Hetherington * Version 2.1.35 released. diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index 3d07933e2..fc2282edc 100644 --- a/src/tools/dcpomatic_create.cc +++ b/src/tools/dcpomatic_create.cc @@ -63,6 +63,8 @@ help (string n) cerr << "Create a film directory (ready for making a DCP) or metadata file from some content files.\n" << "A film directory will be created if -o or --output is specified, otherwise a metadata file\n" << "will be written to stdout.\n"; + + syntax (n); } class SimpleSignalManager : public SignalManager @@ -180,11 +182,13 @@ main (int argc, char* argv[]) signal_manager = new SimpleSignalManager (); + if (name.empty ()) { + name = boost::filesystem::path (argv[optind]).leaf().string (); + } + try { shared_ptr film (new Film (output, false)); - if (!name.empty ()) { - film->set_name (name); - } + film->set_name (name); film->set_container (container_ratio); film->set_dcp_content_type (dcp_content_type);