summaryrefslogtreecommitdiff
path: root/src/lib/writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-02 10:47:35 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-02 10:47:35 +0200
commita6696b9a58c14d81f0ae30482051c2cd47a004db (patch)
tree0fb2983324b891f7dd3ecde04eb92dae00cb0a85 /src/lib/writer.cc
parenta4b7d0af831b8cd9aafca5f2b264be416a7b1148 (diff)
Add language to audio content and use it instead of the general metadata.
Diffstat (limited to 'src/lib/writer.cc')
-rw-r--r--src/lib/writer.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 3448c5bca..0285255e0 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -706,13 +706,19 @@ Writer::write_cover_sheet (boost::filesystem::path output_dcp)
boost::algorithm::replace_all (text, "$CPL_NAME", film()->name());
boost::algorithm::replace_all (text, "$TYPE", film()->dcp_content_type()->pretty_name());
boost::algorithm::replace_all (text, "$CONTAINER", film()->container()->container_nickname());
- boost::algorithm::replace_all (text, "$AUDIO_LANGUAGE", film()->isdcf_metadata().audio_language);
+
+ auto audio_languages = film()->audio_languages();
+ if (!audio_languages.empty()) {
+ boost::algorithm::replace_all (text, "$AUDIO_LANGUAGE", audio_languages.front().description());
+ } else {
+ boost::algorithm::replace_all (text, "$AUDIO_LANGUAGE", _("None"));
+ }
auto subtitle_languages = film()->subtitle_languages();
if (subtitle_languages.first) {
boost::algorithm::replace_all (text, "$SUBTITLE_LANGUAGE", subtitle_languages.first->description());
} else {
- boost::algorithm::replace_all (text, "$SUBTITLE_LANGUAGE", "None");
+ boost::algorithm::replace_all (text, "$SUBTITLE_LANGUAGE", _("None"));
}
boost::uintmax_t size = 0;