From ad6a1f57b9f1eb0472bb4136d14856f9b4f3f2a6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 6 Aug 2015 18:32:02 +0100 Subject: Fix missing help and add a default name if none is specified. --- src/tools/dcpomatic_create.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/tools') 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); -- cgit v1.2.3