Don't write multiple <LoadFont> tags to Interop subtitles (#1273).
[dcpomatic.git] / test / srt_subtitle_test.cc
index a601ea58a2de12a96b78015333ee4c00c3caa16a..6c2928fa8f0599753932647aca662b345b6a048d 100644 (file)
@@ -89,25 +89,9 @@ static void
 check_subtitle_file (shared_ptr<Film> film, boost::filesystem::path ref)
 {
        /* Find the subtitle file and check it */
-       for (
-               boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator (film->directory().get() / film->dcp_name (false));
-               i != boost::filesystem::directory_iterator ();
-               ++i) {
-
-               if (boost::filesystem::is_directory (i->path ())) {
-                       for (
-                               boost::filesystem::directory_iterator j = boost::filesystem::directory_iterator (i->path ());
-                               j != boost::filesystem::directory_iterator ();
-                               ++j) {
-
-                               if (boost::algorithm::starts_with (j->path().leaf().string(), "sub_")) {
-                                       list<string> ignore;
-                                       ignore.push_back ("SubtitleID");
-                                       check_xml (*j, ref, ignore);
-                               }
-                       }
-               }
-       }
+       list<string> ignore;
+       ignore.push_back ("SubtitleID");
+       check_xml (subtitle_file(film), ref, ignore);
 }
 
 /** Make another DCP with a longer .srt file */