summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-25 13:54:10 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-25 13:54:10 +0100
commitd71cf1ae31c7d488c95cd63278b200035e4d6a63 (patch)
tree7413fff544824a7a23873df2ed5681a0e7a65f89 /src/lib
parenta1ad809a3c76dcc4849f18015ac52b4bc51003aa (diff)
Fix problems with loading projects with captions / subs.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/text_content.cc6
-rw-r--r--src/lib/types.cc2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/text_content.cc b/src/lib/text_content.cc
index 761ffc6b7..7c3c27d45 100644
--- a/src/lib/text_content.cc
+++ b/src/lib/text_content.cc
@@ -73,7 +73,7 @@ TextContent::TextContent (Content* parent, TextType type, TextType original_type
}
-/** @return TextContents from node or <Caption> nodes under node (according to version).
+/** @return TextContents from node or <Text> nodes under node (according to version).
* The list could be empty if no TextContents are found.
*/
list<shared_ptr<TextContent> >
@@ -99,12 +99,12 @@ TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version)
return c;
}
- if (!node->optional_node_child("Caption")) {
+ if (!node->optional_node_child("Text")) {
return list<shared_ptr<TextContent> >();
}
list<shared_ptr<TextContent> > c;
- BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Caption")) {
+ BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Text")) {
c.push_back (shared_ptr<TextContent> (new TextContent (parent, i, version)));
}
return c;
diff --git a/src/lib/types.cc b/src/lib/types.cc
index b193ac9cf..898abeca4 100644
--- a/src/lib/types.cc
+++ b/src/lib/types.cc
@@ -100,7 +100,7 @@ string_to_text_type (string s)
return TEXT_UNKNOWN;
} else if (s == "open-subtitle") {
return TEXT_OPEN_SUBTITLE;
- } else if (s == "closed") {
+ } else if (s == "closed-caption") {
return TEXT_CLOSED_CAPTION;
} else {
throw MetadataError (String::compose ("Unknown text type %1", s));