diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-01-11 23:04:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-01-12 02:06:50 +0100 |
| commit | 20c749bb5aee7a12d6a4365bc35fee01b9810fe3 (patch) | |
| tree | 71b6e2894281d0c0e5109b5161bf3441aa46072b /src/lib/film.cc | |
| parent | 5d9b8579950a4440b43a649c27fa36082144773d (diff) | |
Rename subtitle_languages() -> open_text_languages().
Also make it return open captions as well as open subtitles (#2941).
Diffstat (limited to 'src/lib/film.cc')
| -rw-r--r-- | src/lib/film.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index cf04ac0da..8f884a8a5 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -819,7 +819,7 @@ Film::mapped_audio_channels () const pair<optional<dcp::LanguageTag>, vector<dcp::LanguageTag>> -Film::subtitle_languages(bool* burnt_in) const +Film::open_text_languages(bool* burnt_in) const { if (burnt_in) { *burnt_in = true; @@ -830,7 +830,7 @@ Film::subtitle_languages(bool* burnt_in) const auto dcp = dynamic_pointer_cast<DCPContent>(i); for (auto const& text: i->text) { auto const use = text->use() || (dcp && dcp->reference_text(TextType::OPEN_SUBTITLE)); - if (use && text->type() == TextType::OPEN_SUBTITLE) { + if (use && is_open(text->type())) { if (!text->burn() && burnt_in) { *burnt_in = false; } @@ -1012,7 +1012,7 @@ Film::isdcf_name (bool if_created_now) const isdcf_name += "_" + to_upper (audio_language); bool burnt_in; - auto sub_langs = subtitle_languages(&burnt_in); + auto sub_langs = open_text_languages(&burnt_in); auto ccap_langs = closed_caption_languages(); if (sub_langs.first && sub_langs.first->language()) { auto lang = entry_for_language(*sub_langs.first); |
