X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilm.cc;h=399bd3da3ca21f2f5b3f86050e7eea0795b34b03;hb=00fa987750d18ad8f0439bd8a4d940e2852854c3;hp=d5597b5a12dfa49b13255fd49b42f7fd38a65977;hpb=1a18ab415edffc7598e0983b4e632775b1775757;p=dcpomatic.git diff --git a/src/lib/film.cc b/src/lib/film.cc index d5597b5a1..399bd3da3 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -32,6 +32,7 @@ #include "cinema.h" #include "compose.hpp" #include "config.h" +#include "constants.h" #include "cross.h" #include "dcp_content.h" #include "dcp_content_type.h" @@ -56,7 +57,6 @@ #include "text_content.h" #include "transcode_job.h" #include "upload_job.h" -#include "util.h" #include "video_content.h" #include "version.h" #include @@ -156,7 +156,7 @@ Film::Film (optional dir) : _playlist (new Playlist) , _use_isdcf_name (Config::instance()->use_isdcf_name_by_default()) , _dcp_content_type (Config::instance()->default_dcp_content_type ()) - , _container (Config::instance()->default_container ()) + , _container(Ratio::from_id("185")) , _resolution (Resolution::TWO_K) , _encrypted (false) , _context_id (dcp::make_uuid ()) @@ -174,8 +174,10 @@ Film::Film (optional dir) , _user_explicit_container (false) , _user_explicit_resolution (false) , _name_language (dcp::LanguageTag("en-US")) + , _release_territory(Config::instance()->default_territory()) , _version_number (1) , _status (dcp::Status::FINAL) + , _audio_language(Config::instance()->default_audio_language()) , _state_version (current_state_version) , _dirty (false) , _tolerant (false) @@ -807,6 +809,11 @@ Film::isdcf_name (bool if_created_now) const auto raw_name = name (); + auto to_upper = [](string s) { + transform(s.begin(), s.end(), s.begin(), ::toupper); + return s; + }; + /* Split the raw name up into words */ vector words; split (words, raw_name, is_any_of (" _-")); @@ -968,9 +975,7 @@ Film::isdcf_name (bool if_created_now) const if (_release_territory) { auto territory = _release_territory->subtag(); isdcf_name += "_" + to_upper (territory); - if (_ratings.empty ()) { - isdcf_name += "-NR"; - } else { + if (!_ratings.empty()) { auto label = _ratings[0].label; boost::erase_all(label, "+"); boost::erase_all(label, "-");