using std::pair;
using std::map;
using std::vector;
-using std::ifstream;
-using std::ofstream;
using std::setfill;
using std::min;
using std::make_pair;
using libdcp::Size;
using libdcp::Signer;
-int const Film::state_version = 4;
+int const Film::state_version = 5;
/** Construct a Film object in a given directory.
*
<< "_" << scaler()->id()
<< "_" << j2k_bandwidth();
+ if (encrypted ()) {
+ s << "_E";
+ } else {
+ s << "_P";
+ }
+
if (_interop) {
s << "_I";
} else {
cxml::Document f ("Metadata");
f.read_file (file ("metadata.xml"));
+
+ int const version = f.number_child<int> ("Version");
_name = f.string_child ("Name");
_use_dci_name = f.bool_child ("UseDCIName");
_three_d = f.bool_child ("ThreeD");
_interop = f.bool_child ("Interop");
_key = libdcp::Key (f.string_child ("Key"));
- _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"));
+ _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"), version);
_dirty = false;
}
if (!dm.audio_language.empty ()) {
d << "_" << dm.audio_language;
- if (!dm.subtitle_language.empty() && with_subtitles()) {
+ if (!dm.subtitle_language.empty()) {
d << "-" << dm.subtitle_language;
} else {
d << "-XX";
return _playlist->best_dcp_frame_rate ();
}
+bool
+Film::content_paths_valid () const
+{
+ return _playlist->content_paths_valid ();
+}
+
void
Film::playlist_content_changed (boost::weak_ptr<Content> c, int p)
{