From 2c2002ee9cae4fbfa1c72839cafc147506da5887 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 11 Feb 2016 20:51:19 +0100 Subject: Prepare for optional timespan name during export. --- libs/ardour/export_filename.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libs/ardour/export_filename.cc') diff --git a/libs/ardour/export_filename.cc b/libs/ardour/export_filename.cc index 077106a4b0..8186982384 100644 --- a/libs/ardour/export_filename.cc +++ b/libs/ardour/export_filename.cc @@ -169,6 +169,18 @@ ExportFilename::get_path (ExportFormatSpecPtr format) const { string path; bool filename_empty = true; + bool with_timespan = include_timespan; + + if (!include_session + && !include_label + && !include_revision + && !include_timespan + && !include_channel_config + && !include_channel + && !include_date + && !include_format_name) { + with_timespan = true; + } if (include_session) { path += filename_empty ? "" : "_"; @@ -189,7 +201,7 @@ ExportFilename::get_path (ExportFormatSpecPtr format) const filename_empty = false; } - if (include_timespan && timespan) { + if (with_timespan && timespan) { path += filename_empty ? "" : "_"; path += timespan->name(); filename_empty = false; @@ -226,6 +238,10 @@ ExportFilename::get_path (ExportFormatSpecPtr format) const filename_empty = false; } + if (path.empty ()) { + path = "export"; + } + path += "."; path += format->extension (); -- cgit v1.2.3