summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-27 00:29:41 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-27 00:30:25 +0100
commitd880fa106cd803e400aeb246fb4db757a9a87677 (patch)
treefe8c603b9bc8914e52f6efc801f55b26c2b01e78
parent77c8ef5396e971034f27202dc12d00ab9a3f441f (diff)
Fix nonsense DKDM filename format default.
Also auto-correct it in existing config files.
-rw-r--r--src/lib/config.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 3756d3e33..40a9f355f 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -150,7 +150,7 @@ Config::set_defaults()
_confirm_kdm_email = true;
_kdm_container_name_format = dcp::NameFormat("KDM_%f_%c");
_kdm_filename_format = dcp::NameFormat("KDM_%f_%c_%s");
- _dkdm_filename_format = dcp::NameFormat("DKDM_%f_%c_%s");
+ _dkdm_filename_format = dcp::NameFormat("DKDM_%f_%r");
_dcp_metadata_filename_format = dcp::NameFormat("%t");
_dcp_asset_filename_format = dcp::NameFormat("%t");
_jump_to_selected = true;
@@ -550,8 +550,14 @@ try
_show_hints_before_make_dcp = f.optional_bool_child("ShowHintsBeforeMakeDCP").get_value_or(true);
_confirm_kdm_email = f.optional_bool_child("ConfirmKDMEmail").get_value_or(true);
_kdm_container_name_format = dcp::NameFormat(f.optional_string_child("KDMContainerNameFormat").get_value_or("KDM %f %c"));
- _dkdm_filename_format = dcp::NameFormat(f.optional_string_child("DKDMFilenameFormat").get_value_or("DKDM %f %c %s"));
_kdm_filename_format = dcp::NameFormat(f.optional_string_child("KDMFilenameFormat").get_value_or("KDM_%f_%c_%s"));
+ _dkdm_filename_format = dcp::NameFormat(f.optional_string_child("DKDMFilenameFormat").get_value_or("DKDM_%f_%r"));
+ if (_dkdm_filename_format.specification() == "DKDM_%f_%c_%s" || _dkdm_filename_format.specification() == "DKDM %f %c %s") {
+ /* The DKDM filename format is one of our previous defaults, neither of which make any sense.
+ * Fix to something more useful.
+ */
+ _dkdm_filename_format = dcp::NameFormat("DKDM_%f_%r");
+ }
_dcp_metadata_filename_format = dcp::NameFormat(f.optional_string_child("DCPMetadataFilenameFormat").get_value_or("%t"));
_dcp_asset_filename_format = dcp::NameFormat(f.optional_string_child("DCPAssetFilenameFormat").get_value_or("%t"));
_jump_to_selected = f.optional_bool_child("JumpToSelected").get_value_or(true);