From 34e7ae593806e459762e9efe32fdbf9c3a26f40b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 5 Dec 2013 22:39:50 +0000 Subject: Accept any old case for DCP content kinds. --- src/util.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util.cc') diff --git a/src/util.cc b/src/util.cc index 3508e64f..cb58694a 100644 --- a/src/util.cc +++ b/src/util.cc @@ -161,13 +161,13 @@ libdcp::content_kind_to_string (ContentKind kind) libdcp::ContentKind libdcp::content_kind_from_string (string type) { - /* XXX: should probably just convert type to lower-case and have done with it */ + transform (type.begin(), type.end(), type.begin(), ::tolower); if (type == "feature") { return FEATURE; } else if (type == "short") { return SHORT; - } else if (type == "trailer" || type == "Trailer") { + } else if (type == "trailer") { return TRAILER; } else if (type == "test") { return TEST; @@ -175,7 +175,7 @@ libdcp::content_kind_from_string (string type) return TRANSITIONAL; } else if (type == "rating") { return RATING; - } else if (type == "teaser" || type == "Teaser") { + } else if (type == "teaser") { return TEASER; } else if (type == "policy") { return POLICY; -- cgit v1.2.3