Rename Subtitle -> Text
[dcpomatic.git] / src / lib / film.cc
index 332353b71e4ea06b5923885539eb4b7dad27ab7c..0be1ddd7b71a19161c44f6957f63c5a3aae23213 100644 (file)
@@ -46,7 +46,7 @@
 #include "screen.h"
 #include "audio_content.h"
 #include "video_content.h"
-#include "subtitle_content.h"
+#include "text_content.h"
 #include "ffmpeg_content.h"
 #include "dcp_content.h"
 #include "screen_kdm.h"
@@ -293,7 +293,7 @@ void
 Film::make_dcp ()
 {
        if (dcp_name().find ("/") != string::npos) {
-               throw BadSettingError (_("name"), _("cannot contain slashes"));
+               throw BadSettingError (_("name"), _("Cannot contain slashes"));
        }
 
        if (container() == 0) {
@@ -301,7 +301,7 @@ Film::make_dcp ()
        }
 
        if (content().empty()) {
-               throw runtime_error (_("you must add some content to the DCP before creating it"));
+               throw runtime_error (_("You must add some content to the DCP before creating it"));
        }
 
        if (dcp_content_type() == 0) {
@@ -318,10 +318,10 @@ Film::make_dcp ()
                }
                shared_ptr<const DCPContent> dcp = dynamic_pointer_cast<const DCPContent> (i);
                if (dcp && dcp->needs_kdm()) {
-                       throw runtime_error (_("some of your content needs a KDM"));
+                       throw runtime_error (_("Some of your content needs a KDM"));
                }
                if (dcp && dcp->needs_assets()) {
-                       throw runtime_error (_("some of your content needs an OV"));
+                       throw runtime_error (_("Some of your content needs an OV"));
                }
        }
 
@@ -730,7 +730,9 @@ Film::isdcf_name (bool if_created_now) const
        /* Count mapped audio channels */
 
        pair<int, int> ch = audio_channel_types (mapped_audio_channels(), audio_channels());
-       if (ch.first) {
+       if (!ch.first && !ch.second) {
+               d += "_MOS";
+       } else if (ch.first) {
                d += String::compose("_%1%2", ch.first, ch.second);
        }
 
@@ -1172,6 +1174,10 @@ Film::audio_frame_rate () const
 void
 Film::set_sequence (bool s)
 {
+       if (s == _sequence) {
+               return;
+       }
+
        _sequence = s;
        _playlist->set_sequence (s);
        signal_changed (SEQUENCE);
@@ -1555,6 +1561,7 @@ Film::use_template (string name)
        _reel_type = _template_film->_reel_type;
        _reel_length = _template_film->_reel_length;
        _upload_after_make_dcp = _template_film->_upload_after_make_dcp;
+       _isdcf_metadata = _template_film->_isdcf_metadata;
 }
 
 pair<double, double>