Don't use "NR" in the ISDCF name if there is no rating.
[dcpomatic.git] / src / lib / film.cc
index d9f2b0fec46203c48cfb62e6a323fd05432dac67..29952d0f2e8f57fe6e10a7920af1fbce42940338 100644 (file)
@@ -156,7 +156,7 @@ Film::Film (optional<boost::filesystem::path> 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<boost::filesystem::path> 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)
@@ -842,9 +844,7 @@ Film::isdcf_name (bool if_created_now) const
                }
        }
 
-       if (fixed_name.length() > 14) {
-               fixed_name = fixed_name.substr (0, 14);
-       }
+       fixed_name = fixed_name.substr(0, 14);
 
        isdcf_name += fixed_name;
 
@@ -970,9 +970,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, "-");