cpl->set_main_picture_active_area (active_area);
}
- vector<dcp::LanguageTag> sl = film()->subtitle_languages();
- if (sl.size() > 1) {
- cpl->set_additional_subtitle_languages(std::vector<dcp::LanguageTag>(sl.begin() + 1, sl.end()));
+ auto sl = film()->subtitle_languages().second;
+ if (!sl.empty()) {
+ cpl->set_additional_subtitle_languages(sl);
}
auto signer = Config::instance()->signer_chain();
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.empty()) {
- boost::algorithm::replace_all (text, "$SUBTITLE_LANGUAGE", "None");
+ if (subtitle_languages.first) {
+ boost::algorithm::replace_all (text, "$SUBTITLE_LANGUAGE", subtitle_languages.first->description());
} else {
- boost::algorithm::replace_all (text, "$SUBTITLE_LANGUAGE", subtitle_languages.front().description());
+ boost::algorithm::replace_all (text, "$SUBTITLE_LANGUAGE", _("None"));
}
boost::uintmax_t size = 0;