summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-02 23:05:05 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-04 20:48:35 +0200
commitb0c9c0470708d0822631b82915f4ed67e5fc7c1b (patch)
tree1bb8f0e222206d3247d31036afe92aa23fd686e4 /src
parentbb9a4a46266f705142a8aca41a092445a02debf0 (diff)
Use ratings from Interop/SMPTE metadata instead of ISDCF metadata dialogue.
Diffstat (limited to 'src')
-rw-r--r--src/lib/film.cc4
-rw-r--r--src/lib/isdcf_metadata.cc7
-rw-r--r--src/lib/isdcf_metadata.h1
-rw-r--r--src/wx/dcp_panel.cc1
-rw-r--r--src/wx/isdcf_metadata_dialog.cc5
-rw-r--r--src/wx/isdcf_metadata_dialog.h1
6 files changed, 5 insertions, 14 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 9051c5a15..b34c85295 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -961,10 +961,10 @@ Film::isdcf_name (bool if_created_now) const
auto territory = _release_territory->subtag();
transform (territory.begin(), territory.end(), territory.begin(), ::toupper);
d += "_" + territory;
- if (dm.rating.empty ()) {
+ if (_ratings.empty ()) {
d += "-NR";
} else {
- d += "-" + dm.rating;
+ d += "-" + _ratings[0].label;
}
}
diff --git a/src/lib/isdcf_metadata.cc b/src/lib/isdcf_metadata.cc
index daf3a4c4f..c190ba3dc 100644
--- a/src/lib/isdcf_metadata.cc
+++ b/src/lib/isdcf_metadata.cc
@@ -34,8 +34,7 @@ using std::shared_ptr;
using dcp::raw_convert;
ISDCFMetadata::ISDCFMetadata (cxml::ConstNodePtr node)
- : rating (node->string_child ("Rating"))
- , studio (node->string_child ("Studio"))
+ : studio (node->string_child ("Studio"))
, facility (node->string_child ("Facility"))
/* This stuff was added later */
, temp_version (node->optional_bool_child ("TempVersion").get_value_or (false))
@@ -51,7 +50,6 @@ ISDCFMetadata::ISDCFMetadata (cxml::ConstNodePtr node)
void
ISDCFMetadata::as_xml (xmlpp::Node* root) const
{
- root->add_child("Rating")->add_child_text (rating);
root->add_child("Studio")->add_child_text (studio);
root->add_child("Facility")->add_child_text (facility);
root->add_child("TempVersion")->add_child_text (temp_version ? "1" : "0");
@@ -65,8 +63,7 @@ ISDCFMetadata::as_xml (xmlpp::Node* root) const
bool
operator== (ISDCFMetadata const & a, ISDCFMetadata const & b)
{
- return a.rating == b.rating &&
- a.studio == b.studio &&
+ return a.studio == b.studio &&
a.facility == b.facility &&
a.temp_version == b.temp_version &&
a.pre_release == b.pre_release &&
diff --git a/src/lib/isdcf_metadata.h b/src/lib/isdcf_metadata.h
index 3dc2c2d35..1c80e7b5d 100644
--- a/src/lib/isdcf_metadata.h
+++ b/src/lib/isdcf_metadata.h
@@ -43,7 +43,6 @@ public:
void as_xml (xmlpp::Node *) const;
void read_old_metadata (std::string, std::string);
- std::string rating;
std::string studio;
std::string facility;
/** true if this is a temporary version (without final picture or sound) */
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc
index ecedec66f..6d0e64965 100644
--- a/src/wx/dcp_panel.cc
+++ b/src/wx/dcp_panel.cc
@@ -449,6 +449,7 @@ DCPPanel::film_changed (Film::Property p)
case Film::Property::CONTENT_VERSIONS:
case Film::Property::VERSION_NUMBER:
case Film::Property::RELEASE_TERRITORY:
+ case Film::Property::RATINGS:
setup_dcp_name ();
break;
default:
diff --git a/src/wx/isdcf_metadata_dialog.cc b/src/wx/isdcf_metadata_dialog.cc
index cb12d6a29..f7cb8df8c 100644
--- a/src/wx/isdcf_metadata_dialog.cc
+++ b/src/wx/isdcf_metadata_dialog.cc
@@ -35,9 +35,6 @@ using std::shared_ptr;
ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm, bool threed)
: TableDialog (parent, _("ISDCF name"), 2, 1, true)
{
- add (_("Rating (e.g. 15)"), true);
- _rating = add (new wxTextCtrl (this, wxID_ANY));
-
add (_("Studio (e.g. TCF)"), true);
_studio = add (new wxTextCtrl (this, wxID_ANY));
@@ -66,7 +63,6 @@ ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm, bo
add (_("Mastered luminance (e.g. 14fl)"), true);
_mastered_luminance = add (new wxTextCtrl (this, wxID_ANY));
- _rating->SetValue (std_to_wx (dm.rating));
_studio->SetValue (std_to_wx (dm.studio));
_facility->SetValue (std_to_wx (dm.facility));
_temp_version->SetValue (dm.temp_version);
@@ -85,7 +81,6 @@ ISDCFMetadataDialog::isdcf_metadata () const
{
ISDCFMetadata dm;
- dm.rating = wx_to_std (_rating->GetValue ());
dm.studio = wx_to_std (_studio->GetValue ());
dm.facility = wx_to_std (_facility->GetValue ());
dm.temp_version = _temp_version->GetValue ();
diff --git a/src/wx/isdcf_metadata_dialog.h b/src/wx/isdcf_metadata_dialog.h
index 8980bd11a..2fc8ca8c3 100644
--- a/src/wx/isdcf_metadata_dialog.h
+++ b/src/wx/isdcf_metadata_dialog.h
@@ -33,7 +33,6 @@ public:
ISDCFMetadata isdcf_metadata () const;
private:
- wxTextCtrl* _rating;
wxTextCtrl* _studio;
wxTextCtrl* _facility;
wxCheckBox* _temp_version;