From 2a0baad8faa27b86ea24e0cbbf712d63a19db572 Mon Sep 17 00:00:00 2001 From: Thijs Riezebeek Date: Sun, 28 Feb 2016 15:41:26 +0100 Subject: [PATCH] Add line ending detection --- src/SubRip/File.php | 23 +- src/SubRip/NoLineEndingsFoundException.php | 3 + src/SubRip/Reader.php | 77 +- src/SubRip/Subtitle.php | 9 - src/SubRip/Writer.php | 22 +- tests/bad_format_hoc_s02e02_full.srt | 3105 ++++++++++++++++++++ tests/integration/SrtFileTest.php | 34 - tests/integration/SubRip/FileTest.php | 36 + tests/unittests/SubRip/ModifierTest.php | 22 +- 9 files changed, 3275 insertions(+), 56 deletions(-) create mode 100644 src/SubRip/NoLineEndingsFoundException.php create mode 100644 tests/bad_format_hoc_s02e02_full.srt delete mode 100644 tests/integration/SrtFileTest.php create mode 100644 tests/integration/SubRip/FileTest.php diff --git a/src/SubRip/File.php b/src/SubRip/File.php index 9765f46..9f6afe9 100644 --- a/src/SubRip/File.php +++ b/src/SubRip/File.php @@ -5,7 +5,12 @@ class File /** * @var Subtitle[] */ - private $subtitles = []; + protected $subtitles = []; + + /** + * @var string + */ + protected $line_ending = PHP_EOL; /** * @return int @@ -30,4 +35,20 @@ public function getSubtitles () { return $this->subtitles; } + + /** + * @return string + */ + public function getLineEnding () + { + return $this->line_ending; + } + + /** + * @param string $line_ending + */ + public function setLineEnding ($line_ending) + { + $this->line_ending = $line_ending; + } } \ No newline at end of file diff --git a/src/SubRip/NoLineEndingsFoundException.php b/src/SubRip/NoLineEndingsFoundException.php new file mode 100644 index 0000000..9ccc2bb --- /dev/null +++ b/src/SubRip/NoLineEndingsFoundException.php @@ -0,0 +1,3 @@ +setLineEnding(self::getFileLineEnding($file_contents)); + } + catch (NoLineEndingsFoundException $e) + { + // Probably a file with no subtitles at all (empty) + return $srt_file; + } + + $block_separator = $srt_file->getLineEnding() . $srt_file->getLineEnding(); + $blocks = explode($block_separator, $file_contents); + self::scanBlocksIntoFile($srt_file, $blocks); - return self::scanBlocks($blocks); + return $srt_file; } /** + * @param string $file_contents + * @return string + * @throws NoLineEndingsFoundException + */ + private static function getFileLineEnding($file_contents) + { + // Search for double newlines that break up the blocks + if (preg_match("/(\r\n\r\n)/s", $file_contents)) + { + return "\r\n"; + } + if (preg_match("/(\n\r\n\r)/s", $file_contents)) + { + return "\n\r"; + } + if (preg_match("/(\n\n)/s", $file_contents)) + { + return "\n"; + } + if (preg_match("/(\r\r)/s", $file_contents)) + { + return "\r"; + } + + // No double newlines so far, meaning a file with one subtitle + if (preg_match("/(\r\n)/s", $file_contents)) + { + return "\r\n"; + } + if (preg_match("/(\n\r)/s", $file_contents)) + { + return "\n\r"; + } + if (preg_match("/(\n)/s", $file_contents)) + { + return "\n"; + } + if (preg_match("/(\r)/s", $file_contents)) + { + return "\r"; + } + + throw new NoLineEndingsFoundException(""); + } + + /** + * @param File $srt_file * @param array $blocks - * @return File */ - protected static function scanBlocks(array $blocks) + protected static function scanBlocksIntoFile(File $srt_file, array $blocks) { - $srt_file = new File(); foreach ($blocks as $block) { if (trim($block) === "") @@ -47,8 +106,6 @@ protected static function scanBlocks(array $blocks) $srt_file->addSubtitle(self::createSubtitleFromBlock($block)); } - - return $srt_file; } /** @@ -68,9 +125,13 @@ protected static function createSubtitleFromBlock($block) return $subtitle; } + /** + * @param string $block + * @return mixed + */ protected static function matchBlockToRegex ($block) { - preg_match("/(\d*)\r?\n(\d\d:\d\d:\d\d,\d\d\d) --> (\d\d:\d\d:\d\d,\d\d\d)\r?\n(.*)/s", $block, $matches); + preg_match('/(\d*)(?:\r\n|\n\r|\n|\r)(\d{1,3}:\d{1,2}:\d{1,2},\d{1,3}) --> (\d{1,3}:\d{1,2}:\d{1,2},\d{1,3})(?:\r\n|\n\r|\n|\r)(.*)/s', $block, $matches); return $matches; } diff --git a/src/SubRip/Subtitle.php b/src/SubRip/Subtitle.php index b4f267b..3eaecb3 100644 --- a/src/SubRip/Subtitle.php +++ b/src/SubRip/Subtitle.php @@ -69,13 +69,4 @@ public function getFormattedStopTime () { return $this->stop_time->toString(); } - - /** - * @return string - */ - public function toString () - { - return sprintf("%d\n%s --> %s\n%s", - $this->number, $this->getFormattedStartTime(), $this->getFormattedStopTime(), $this->text); - } } \ No newline at end of file diff --git a/src/SubRip/Writer.php b/src/SubRip/Writer.php index 1e47f63..2d633bf 100644 --- a/src/SubRip/Writer.php +++ b/src/SubRip/Writer.php @@ -14,6 +14,15 @@ public static function writeFile (File $srt_file, $destination) file_put_contents($destination, $file_contents); } + /** + * @param File $srt_file + * @return string + */ + public static function writeFileToString (File $srt_file) + { + return self::createFileContents($srt_file); + } + /** * @param File $srt_file * @return string @@ -23,15 +32,26 @@ private static function createFileContents (File $srt_file) $new_file = ""; $subtitles = $srt_file->getSubtitles(); $subtitle_count = $srt_file->subtitleCount(); + $line_ending = $srt_file->getLineEnding(); for ($i = 0; $i < $subtitle_count; $i += 1) { - $new_file .= $subtitles[$i]->toString() . (self::isLastSubtitle($i, $subtitle_count) ? "\n" : "\n\n"); + $new_file .= self::subtitleToString($subtitles[$i], $line_ending) . $line_ending; + if (!self::isLastSubtitle($i, $subtitle_count)) + { + $new_file .= $line_ending; + } } return $new_file; } + protected static function subtitleToString (Subtitle $subtitle, $line_ending) + { + return sprintf("%d$line_ending%s --> %s$line_ending%s", + $subtitle->number, $subtitle->getFormattedStartTime(), $subtitle->getFormattedStopTime(), $subtitle->text); + } + /** * @param int $i * @param int $subtitle_count diff --git a/tests/bad_format_hoc_s02e02_full.srt b/tests/bad_format_hoc_s02e02_full.srt new file mode 100644 index 0000000..762798f --- /dev/null +++ b/tests/bad_format_hoc_s02e02_full.srt @@ -0,0 +1,3105 @@ +1 +00:00:21,718 --> 00:00:25,930 +This is not the most inspiring +choice for vice president, right? + +2 +00:00:25,971 --> 00:00:29,266 +A well-respected operator, +pragmatic, but let's face it, + +3 +00:00:29,266 --> 00:00:32,185 +this is probably just a nod +to Congress, tapping one of their own. + +4 +00:00:32,185 --> 00:00:36,690 +It's really nothing more than +a placeholder until 2016, assuredly. + +5 +00:00:36,690 --> 00:00:39,151 +I'm not surprised he's doing +a private swearing-in. + +6 +00:00:39,151 --> 00:00:42,112 +My bet is the president wants to draw +as little attention to this as possible. + +7 +00:00:42,112 --> 00:00:44,906 +There's just +no real wow factor... + +8 +00:00:50,620 --> 00:00:52,581 +Christina's working out well? + +9 +00:00:52,581 --> 00:00:55,167 +She's getting her sea legs, but +I've been happy so far. + +10 +00:00:55,167 --> 00:00:57,252 +- She works hard. +- It's a big load off my shoulders + +11 +00:00:57,252 --> 00:00:59,713 +when she can travel with the +president instead of me. + +12 +00:00:59,713 --> 00:01:02,716 +I get so much more done +when I stay here. + +13 +00:01:04,384 --> 00:01:06,595 +President have a preference +in the whip's race? + +14 +00:01:06,595 --> 00:01:08,430 +I can't believe how ugly +it's gotten. + +15 +00:01:08,430 --> 00:01:10,223 +He was more disappointed +than anything else... + +16 +00:01:10,223 --> 00:01:13,018 +- Watch out, Wes. +- I hope I'm not interrupting. + +17 +00:01:13,018 --> 00:01:14,978 +- Not at all. +- This is something else. + +18 +00:01:14,978 --> 00:01:17,105 +Security specs. They had +to work fast. Watch yourself. + +19 +00:01:17,105 --> 00:01:18,857 +It's like a war zone +around here. + +20 +00:01:18,857 --> 00:01:21,026 +The idea is to keep +the war from getting in. + +21 +00:01:21,026 --> 00:01:22,986 +How's the whip's race coming, +Congressman? + +22 +00:01:22,986 --> 00:01:24,446 +It's tight between +you and Howard? + +23 +00:01:24,446 --> 00:01:25,906 +Well, you'd have to ask Howard, + +24 +00:01:25,906 --> 00:01:28,116 +if he's not too busy +trying to sodomize me. + +25 +00:01:28,116 --> 00:01:31,119 +- Should we go say hello? - For God sakes, +don't make me talk to that man. + +26 +00:01:33,330 --> 00:01:37,876 +- Good to see you, Howard. +- Nice to see you, Wes. + +27 +00:01:37,876 --> 00:01:40,879 +Yeah, I bet it is. + +28 +00:01:53,350 --> 00:01:55,185 +- Bob. +- Frank. + +29 +00:01:55,185 --> 00:01:56,853 +- Thanks for inviting me, Frank. +- What? + +30 +00:01:56,853 --> 00:01:58,688 +- Thanks for inviting me. +- You bet. + +31 +00:01:58,688 --> 00:02:04,152 +- Hey, Frank. +- Judge! Good to see you. + +32 +00:02:04,152 --> 00:02:06,988 +- Is there somewhere I can go to change? +- Yes, absolutely. + +33 +00:02:06,988 --> 00:02:09,741 +There's room down the hall. +Doug, will you take care of the judge? + +34 +00:02:09,741 --> 00:02:11,868 +And when he's ready, +let's get this thing over with. + +35 +00:02:11,868 --> 00:02:13,495 +I'll start bringing 'em in. + +36 +00:02:13,495 --> 00:02:15,497 +"That I take this +obligation freely, + +37 +00:02:15,497 --> 00:02:19,000 +without any mental reservation +or purpose of evasion..." + +38 +00:02:19,000 --> 00:02:20,794 +That I take +this obligation freely, + +39 +00:02:20,794 --> 00:02:23,130 +without any mental reservation +or purpose of evasion... + +40 +00:02:23,130 --> 00:02:24,631 +"...and that I will..." + +41 +00:02:24,631 --> 00:02:26,299 +One heartbeat away +from the presidency, + +42 +00:02:26,299 --> 00:02:28,635 +and not a single +vote cast in my name. + +43 +00:02:28,635 --> 00:02:32,472 +- Democracy is so overrated. +- "...on which I am about to enter, + +44 +00:02:32,472 --> 00:02:35,517 +- so help me God." +- ...and that I will well and faithfully + +45 +00:02:35,517 --> 00:02:40,856 +discharge the duties of the office on +which I am about to enter, so help me God. + +46 +00:02:40,856 --> 00:02:44,901 +- Congratulations, +Mr. Vice President. + +47 +00:02:55,787 --> 00:02:58,665 +All right, let's get back +to running the country. + +48 +00:02:58,707 --> 00:04:33,510 +Subtitles by MemoryOnSmells +http://UKsubtitles.ru. + +49 +00:04:33,552 --> 00:04:35,887 +Now, one of you is +gonna replace me as the whip. + +50 +00:04:35,887 --> 00:04:38,265 +You're the two frontrunners +and we know you both want it. + +51 +00:04:38,265 --> 00:04:40,559 +You're not behaving +like men who belong in the leadership. + +52 +00:04:40,559 --> 00:04:42,978 +We need to tone +down the rhetoric. + +53 +00:04:42,978 --> 00:04:45,355 +- You're hurting the party. +- I'm just responding + +54 +00:04:45,355 --> 00:04:46,898 +to the lies Howard's +been slinging. + +55 +00:04:46,898 --> 00:04:49,192 +Those junkets happened, Wes. +I'm not making it up. + +56 +00:04:49,192 --> 00:04:51,570 +- And nepotism's any better? +- That's just not true and you know it. + +57 +00:04:51,570 --> 00:04:53,989 +Your sister's husband happened +to be appointed state treasurer? + +58 +00:04:53,989 --> 00:04:55,574 +Ex-husband. And yes. + +59 +00:04:55,574 --> 00:04:57,325 +That is such +a load of crap, Howard. + +60 +00:04:57,325 --> 00:04:59,286 +Gentlemen, Bob is right. + +61 +00:04:59,286 --> 00:05:01,413 +This sort of catfighting +gets out in the press, + +62 +00:05:01,413 --> 00:05:04,207 +whichever one of you wins +hits the ground limping. + +63 +00:05:04,207 --> 00:05:09,671 +Let's keep it clean and bring some civility +back to the House. Can we agree to that? + +64 +00:05:12,758 --> 00:05:14,676 +I'd feel a lot better +if you shook hands on it. + +65 +00:05:21,308 --> 00:05:23,351 +Thank you. + +66 +00:05:30,150 --> 00:05:32,444 +I'm with him right now, +Christina. + +67 +00:05:32,444 --> 00:05:34,613 +I'm off. I'll swing +by your office later. + +68 +00:05:34,613 --> 00:05:37,240 +Don't. It's not ready yet. +I'll be working from here. + +69 +00:05:37,240 --> 00:05:39,534 +- What? +- Tusk is in town. + +70 +00:05:39,534 --> 00:05:41,953 +He's meeting with the president +in 45 minutes. Christina just told me. + +71 +00:05:41,953 --> 00:05:44,289 +- The Joint Commission talks. +- That's what she said. + +72 +00:05:44,289 --> 00:05:46,750 +- Christina's proving useful. +- We'll stay in touch. + +73 +00:05:46,750 --> 00:05:49,378 +Get me Cathy Durant. +Your people coming by? + +74 +00:05:49,378 --> 00:05:52,881 +Just my new chief of staff. +That's all I've got until we hire more. + +75 +00:05:52,881 --> 00:05:56,468 +So how's it feel to be married +to the vice president? + +76 +00:05:56,468 --> 00:06:00,222 +Exactly +the same... just louder. + +77 +00:06:00,222 --> 00:06:02,432 +Secretary Durant. + +78 +00:06:02,432 --> 00:06:03,600 +Cathy. + +79 +00:06:06,395 --> 00:06:08,146 +Raymond. + +80 +00:06:09,898 --> 00:06:12,317 +Congratulations, +Mr. Vice President. + +81 +00:06:12,317 --> 00:06:16,780 +Thank you very much. +May I please introduce Secretary Durant. + +82 +00:06:16,780 --> 00:06:20,409 +- A pleasure, Madame Secretary. +- Hi. + +83 +00:06:20,409 --> 00:06:25,247 +Well, this is quite a surprise. +I had no idea you were in town. + +84 +00:06:25,247 --> 00:06:27,666 +Ah... + +85 +00:06:27,666 --> 00:06:29,418 +Well... + +86 +00:06:44,725 --> 00:06:46,893 +Morning, sir. + +87 +00:06:46,893 --> 00:06:49,146 +- Mr. President. +- Catherine. + +88 +00:06:49,146 --> 00:06:52,607 +- We just happened to run into Raymond. +- Huh! + +89 +00:06:52,607 --> 00:06:55,902 +Wonderful. Come on in. + +90 +00:06:58,363 --> 00:07:00,657 +The phone records will +absolutely prove I'm right. + +91 +00:07:00,657 --> 00:07:02,325 +There were no phone records. +You know that. + +92 +00:07:02,325 --> 00:07:04,202 +The data history, +with the carrier. + +93 +00:07:04,202 --> 00:07:06,329 +Even if we got the case reopened, +which isn't gonna happen, + +94 +00:07:06,329 --> 00:07:09,541 +you have any idea how hard it +is to get a warrant for phone data? + +95 +00:07:09,541 --> 00:07:12,210 +Probable cause. +Bring him in for questioning. + +96 +00:07:12,210 --> 00:07:15,005 +- Technically, you have jurisdiction. +- The vice president? + +97 +00:07:15,005 --> 00:07:18,091 +I know this all sounds preposterous +to you, but if you go through my notes... + +98 +00:07:18,091 --> 00:07:21,470 +- We've been through your notes. +- You've listened, but you haven't heard me. + +99 +00:07:21,470 --> 00:07:24,306 +Circumstantial, +yes, but plausible. + +100 +00:07:24,306 --> 00:07:27,601 +I know you've +reopened cases on less. + +101 +00:07:27,601 --> 00:07:31,104 +This has gotta stop, man. +We keep having the same conversation. + +102 +00:07:31,104 --> 00:07:33,273 +It can't be an accident. + +103 +00:07:36,276 --> 00:07:41,865 +OK, I'm gonna +show you something. + +104 +00:07:41,865 --> 00:07:46,912 +CNN tried to get ahold of this, +we 86'd it out of respect to the family. + +105 +00:07:46,912 --> 00:07:48,830 +The footage? + +106 +00:07:52,584 --> 00:07:56,088 +- It's not easy to watch. +- I want to see it. + +107 +00:08:00,842 --> 00:08:04,721 +She tripped, or jumped. + +108 +00:08:07,015 --> 00:08:09,101 +She didn't jump. + +109 +00:08:13,397 --> 00:08:15,524 +Here it is, frame by frame. + +110 +00:08:30,622 --> 00:08:35,001 +Now, there were two witnesses. +One was a 70-year-old woman +with macular degeneration. + +111 +00:08:35,001 --> 00:08:37,713 +All she saw was a blur. +The second was the conductor of the train. + +112 +00:08:37,713 --> 00:08:40,757 +He said it looked like she fell. +Between those two and this video, + +113 +00:08:40,757 --> 00:08:43,593 +that's all there is. + +114 +00:08:43,593 --> 00:08:50,058 +You can watch it a million +times, but this case is closed. + +115 +00:08:50,058 --> 00:08:53,395 +We should limit the agenda +to a couple of key issues: + +116 +00:08:53,395 --> 00:08:56,773 +import tariffs on industrial +manufactured goods, + +117 +00:08:56,773 --> 00:08:59,985 +and export quotas +on rare earth elements. + +118 +00:08:59,985 --> 00:09:02,571 +They're using both +as political levers. + +119 +00:09:02,571 --> 00:09:05,532 +I agree these are two areas where we can +make meaningful progress. + +120 +00:09:05,532 --> 00:09:08,452 +But I'm worried about the rise +in corporate cyberattacks. + +121 +00:09:08,452 --> 00:09:13,165 +- That's a rabbit hole. +- We have to address it sooner or later. + +122 +00:09:13,165 --> 00:09:15,625 +It's just a matter of whether +we want to address it now. + +123 +00:09:15,625 --> 00:09:20,756 +Chinese don't like surprises. +All I'm proposing is that we +use the Joint Commission talks + +124 +00:09:20,756 --> 00:09:23,717 +to bring it up gently now, +set the stage for the next round. + +125 +00:09:23,717 --> 00:09:25,594 +Look, I'm a businessman, +not a diplomat. + +126 +00:09:25,594 --> 00:09:29,931 +But I'm a businessman with +35 years' experience working in China. + +127 +00:09:29,931 --> 00:09:32,267 +When they come to the table, +you don't get greedy. + +128 +00:09:32,267 --> 00:09:35,145 +You're working on a co-venture +refinery project in Fujian. + +129 +00:09:35,145 --> 00:09:37,189 +Which would be +the first of its kind. + +130 +00:09:37,189 --> 00:09:40,233 +Open the gateway +for increased investment... + +131 +00:09:40,233 --> 00:09:42,903 +Cyberattacks +threaten those co-ventures. + +132 +00:09:42,903 --> 00:09:46,490 +There's less a need for them +if the Chinese can obtain new technology + +133 +00:09:46,490 --> 00:09:49,076 +- from corporate espionage. +- Frank, what do you think? + +134 +00:09:49,076 --> 00:09:50,994 +I lean more toward +Raymond's thinking. + +135 +00:09:50,994 --> 00:09:54,081 +If we antagonize the Chinese, +we could undo years of progress. + +136 +00:09:54,081 --> 00:09:58,835 +Allow me to do this quietly, with a +soft touch. I won't antagonize them, sir. + +137 +00:09:58,835 --> 00:10:01,213 +The last thing we want to do +is rock the boat. + +138 +00:10:01,213 --> 00:10:02,756 +What do you have +in mind, Catherine? + +139 +00:10:02,756 --> 00:10:06,009 +A suggested agenda, +not a demand. + +140 +00:10:06,009 --> 00:10:10,013 +We'll keep it mid-level. +I won't get anywhere near it. + +141 +00:10:10,013 --> 00:10:13,433 +- Raymond? +- I've voiced my concerns. + +142 +00:10:17,354 --> 00:10:20,482 +- A very soft touch. +- You have my word, sir. + +143 +00:10:20,482 --> 00:10:22,150 +Good. + +144 +00:10:23,860 --> 00:10:27,364 +Raymond, you want +to grab some lunch? + +145 +00:10:28,532 --> 00:10:30,951 +- Would love to. +- Thanks, Frank. + +146 +00:10:30,951 --> 00:10:34,496 +- Welcome to the West Wing. +- Thank you, sir. + +147 +00:10:40,460 --> 00:10:44,047 +The president is like a lone +tree in an empty field. + +148 +00:10:44,047 --> 00:10:46,341 +He leans whichever way +the wind is blowing. + +149 +00:10:46,341 --> 00:10:50,971 +And right now, Raymond Tusk +blows far too strong from the West. + +150 +00:10:50,971 --> 00:10:53,306 +- Is that a wig? +- No. + +151 +00:10:53,306 --> 00:10:56,601 +- He's been growing it out for months. +- Here, this way. + +152 +00:10:56,601 --> 00:10:59,271 +Diane says she likes it long. + +153 +00:10:59,271 --> 00:11:04,860 +I told her she'll feel differently +once she sees the first dreadlock or... + +154 +00:11:04,860 --> 00:11:06,903 +- ...smells it. +- Oh! + +155 +00:11:09,281 --> 00:11:11,450 +I went to see your +daughter last weekend. + +156 +00:11:14,036 --> 00:11:16,288 +- How is she? +- You want to see a picture? + +157 +00:11:16,288 --> 00:11:18,457 +OK. + +158 +00:11:20,375 --> 00:11:22,961 +- Was her mother there? +- Yeah. + +159 +00:11:23,879 --> 00:11:25,422 +Are they OK on money? + +160 +00:11:25,422 --> 00:11:27,758 +The rate at Greenwoods +is going up in January. + +161 +00:11:27,758 --> 00:11:31,053 +Catalina's worried +she's gonna be short. + +162 +00:11:31,053 --> 00:11:33,430 +I'll make sure to put +more into the account. + +163 +00:11:33,430 --> 00:11:35,307 +We don't have to talk +about her if you don't want. + +164 +00:11:35,307 --> 00:11:38,935 +No, no, no, it's fine. +I appreciate you going to see her. + +165 +00:11:38,935 --> 00:11:41,646 +I'm sorry, Ted, I thought that +when you asked me to lunch, + +166 +00:11:41,646 --> 00:11:45,233 +- it was because you... +- No, no, no. I mean... yes. + +167 +00:11:45,233 --> 00:11:50,030 +I want to make sure they +have what they need. But no. + +168 +00:11:50,030 --> 00:11:54,117 +The reason I wanted to talk... + +169 +00:11:55,619 --> 00:11:58,914 +- Lorrie Tate. +- Lorrie's a friend of mine. + +170 +00:11:58,914 --> 00:12:01,083 +What about her? + +171 +00:12:01,083 --> 00:12:04,336 +She mentioned you were +interested in the whip's race. + +172 +00:12:04,336 --> 00:12:08,215 +Oh, no. +Oh, I wish she hadn't. + +173 +00:12:08,215 --> 00:12:12,344 +- Why not? +- Because it's ridiculous. + +174 +00:12:12,344 --> 00:12:13,845 +Is it? + +175 +00:12:16,890 --> 00:12:19,017 +I just mentioned it offhand. + +176 +00:12:19,017 --> 00:12:21,770 +The whole Webb and Buchwalter +thing, it's just... + +177 +00:12:21,770 --> 00:12:24,481 +- Complete mess. +- But I wasn't serious. + +178 +00:12:24,481 --> 00:12:28,068 +I think you should be serious. +Do you want to do it? + +179 +00:12:28,068 --> 00:12:30,404 +I don't have the experience, +Ted. And I don't... + +180 +00:12:30,404 --> 00:12:33,281 +- Yes or no? +- Yes, of course. + +181 +00:12:33,281 --> 00:12:37,202 +Someday. But now? +I don't have the money they do. + +182 +00:12:37,202 --> 00:12:40,831 +- Unless you use mine. +- You can't waste your money on... + +183 +00:12:40,831 --> 00:12:44,835 +If I funnel my PAC money +to some folks who are on the fence, + +184 +00:12:44,835 --> 00:12:48,004 +round up a couple dozen +commitments before you announce, + +185 +00:12:48,004 --> 00:12:53,260 +that would make you an instant contender. +Now, tell me that's a waste. + +186 +00:12:53,260 --> 00:12:55,387 +We're talking +hundreds of thousands. + +187 +00:12:55,387 --> 00:12:57,889 +It's not a Christmas present, +Jackie. + +188 +00:12:57,889 --> 00:13:00,809 +With you as whip, I have +a strong ally in the leadership. + +189 +00:13:00,809 --> 00:13:06,440 +I stand to gain as much as you. +Now, hang on one second. + +190 +00:13:06,440 --> 00:13:09,109 +I don't know where the... + +191 +00:13:11,194 --> 00:13:12,904 +How did it go? +Did he buy it? + +192 +00:13:12,904 --> 00:13:16,158 +Whatever bug you put in his ear, +it burrowed deep. + +193 +00:13:16,158 --> 00:13:18,910 +It was easy. The man adores +you like you're his own child. + +194 +00:13:18,910 --> 00:13:21,705 +But you sure as hell better +make me chief deputy. + +195 +00:13:21,705 --> 00:13:26,168 +- I need to win first. +- Ted and I make two, 111 to go. + +196 +00:13:26,168 --> 00:13:28,920 +It's always good when the chief deputy +knows her arithmetic. + +197 +00:13:28,920 --> 00:13:31,715 +Fuck off. +Let's start taking names. + +198 +00:13:31,715 --> 00:13:35,927 +- This one seems promising. +- Connor Ellis. He's solid. + +199 +00:13:35,927 --> 00:13:39,598 +- Good experience. - He's the one that +got Senator Jones out of that mess + +200 +00:13:39,598 --> 00:13:43,101 +- with the push-polling. +- Yes. Kept him from the Ethics Committee. + +201 +00:13:43,101 --> 00:13:46,813 +- Let's set up an interview. +- I'll find a good time in the schedule. + +202 +00:13:46,813 --> 00:13:50,901 +Let's talk about the schedule. +I think we need to be... + +203 +00:13:50,901 --> 00:13:53,737 +...more selective +with the events I do. + +204 +00:13:53,737 --> 00:13:58,200 +Some of these are leftovers from +Mrs. Matthews. We can +cancel whatever you like. + +205 +00:13:58,200 --> 00:14:00,285 +And what's this? + +206 +00:14:00,285 --> 00:14:03,538 +Your husband will be pinning stars +on two newly commissioned Marine generals. + +207 +00:14:03,538 --> 00:14:06,875 +- I think that's one you should do. +- OK, walk me through it. + +208 +00:14:06,875 --> 00:14:10,754 +The generals are Alicia Hampton +and Dalton McGinnis. + +209 +00:14:10,754 --> 00:14:13,965 +- Arriving at 6:50... +- Dalton McGinnis? + +210 +00:14:13,965 --> 00:14:16,385 +Yes. Do you know him? + +211 +00:14:20,347 --> 00:14:23,809 +We went to college together. + +212 +00:14:23,809 --> 00:14:26,853 +I'm sorry. Where were we? +Um, arrive what time? + +213 +00:14:26,853 --> 00:14:28,814 +- Six-fifty. +- Great. I'd like a list + +214 +00:14:28,814 --> 00:14:30,774 +of all the people +that will be attending. + +215 +00:14:30,774 --> 00:14:33,568 +It's not that big a deal +if I get left out, + +216 +00:14:33,568 --> 00:14:35,696 +but you're +the secretary of state. + +217 +00:14:35,696 --> 00:14:38,115 +I mean, Tusk should not +be determining policy. + +218 +00:14:38,115 --> 00:14:41,576 +The president alone should +instruct you on what you are to pursue. + +219 +00:14:41,576 --> 00:14:44,788 +- What's their relationship? +- He's has had his ear for years. + +220 +00:14:44,788 --> 00:14:47,207 +- An advisor... +- More of a mentor. + +221 +00:14:47,207 --> 00:14:49,376 +And one whose advice +is not easily dismissed. + +222 +00:14:49,376 --> 00:14:51,461 +He's gonna keep pushing back +on cyberwarfare. + +223 +00:14:51,461 --> 00:14:55,632 +- Not if I get it on the agenda. +- Especially if you get it on the agenda. + +224 +00:14:55,632 --> 00:14:57,509 +Tusk is not gonna +take any chances + +225 +00:14:57,509 --> 00:15:00,178 +when the next Joint Commission +talks come around. + +226 +00:15:00,178 --> 00:15:01,888 +You agreed with him +in the meeting. + +227 +00:15:01,888 --> 00:15:04,766 +If we had ganged up, he would've taken +a firmer position. + +228 +00:15:04,766 --> 00:15:08,812 +For all we know, he's convincing +the president right now to change his mind. + +229 +00:15:08,812 --> 00:15:12,607 +Now, we need to remove +that option as a possibility. + +230 +00:15:12,607 --> 00:15:17,988 +- How? - Force the Chinese to +confront the issue now, + +231 +00:15:17,988 --> 00:15:21,408 +- this round of talks. +- I promised the president a soft touch. + +232 +00:15:21,408 --> 00:15:25,704 +- I can't intentionally break my promise. +- What if it was unintentional? + +233 +00:15:28,081 --> 00:15:33,712 +Cathy, if you don't like how +the table is set, turn over the table. + +234 +00:15:37,883 --> 00:15:41,053 +- You're cheating. +- No, I'm not. It's vapor. + +235 +00:15:41,053 --> 00:15:43,930 +- Still. +- You should try it. + +236 +00:15:43,930 --> 00:15:49,352 +- Addiction without the consequences. +- It's all yours. + +237 +00:15:49,352 --> 00:15:51,396 +You staying up? + +238 +00:15:52,606 --> 00:15:54,900 +This ceremony tomorrow night. + +239 +00:15:54,900 --> 00:15:57,819 +- You don't want to go. +- If I don't have to. + +240 +00:15:57,819 --> 00:15:59,738 +I hate these +sort of things, too, + +241 +00:15:59,738 --> 00:16:03,492 +but it is my first public +appearance as vice president. + +242 +00:16:05,327 --> 00:16:08,163 +- OK. +- Thank you. + +243 +00:16:12,459 --> 00:16:15,587 +Should we turn this +into a proper office? + +244 +00:16:15,587 --> 00:16:20,467 +That's not a bad idea. +No privacy downstairs. + +245 +00:16:20,467 --> 00:16:22,928 +I'll talk to the contractor. + +246 +00:16:22,928 --> 00:16:26,223 +- Good night, Francis. +- Good night. + +247 +00:16:47,452 --> 00:16:51,164 +Sir, sir! Congressional Record. +Weren't the talks supposed to go until six? + +248 +00:16:51,164 --> 00:16:54,000 +- We can't talk if they won't listen. +- Did the Chinese walk out? + +249 +00:16:54,000 --> 00:16:56,128 +We made it clear that we won't +discuss any other issues + +250 +00:16:56,128 --> 00:16:58,922 +until government-sponsored +cyberattacks are on the table. + +251 +00:16:58,922 --> 00:17:01,007 +That's not what +they wanted to hear. + +252 +00:17:01,007 --> 00:17:03,301 +Sir, what did you tell the Chinese +delegation before they walked out? + +253 +00:17:03,301 --> 00:17:06,638 +We didn't have anybody there. +The Joint Commission's +usually a snooze fest. + +254 +00:17:06,638 --> 00:17:09,057 +- Not today, it wasn't. +- I've got Greer on it. + +255 +00:17:09,057 --> 00:17:11,017 +Isn't this international? + +256 +00:17:11,017 --> 00:17:12,978 +We need somebody from the tech +beat if we want any background + +257 +00:17:12,978 --> 00:17:15,981 +- on cyberwarfare. +- Does he have anybody on record yet? + +258 +00:17:15,981 --> 00:17:18,400 +The Chinese aren't talking. +And all the US delegation said + +259 +00:17:18,400 --> 00:17:21,319 +- is what's in the AP wire. +- I want something online in two hours. + +260 +00:17:21,319 --> 00:17:24,156 +In-depth follow-up +sometime this week. + +261 +00:17:25,657 --> 00:17:30,996 +Hey, Lucas... you all right? + +262 +00:17:30,996 --> 00:17:32,956 +Yeah, why? + +263 +00:17:32,956 --> 00:17:36,293 +You're wearing the same +clothes you wore yesterday. + +264 +00:17:36,293 --> 00:17:38,503 +Am I? + +265 +00:17:38,503 --> 00:17:41,381 +I don't know what's going on +in your personal life, + +266 +00:17:41,381 --> 00:17:45,177 +but it seems to be entering the +workplace. Appearances matter. + +267 +00:17:45,177 --> 00:17:49,056 +We can't have an editor looking +more disheveled than his reporters. + +268 +00:17:49,056 --> 00:17:51,808 +Two hours. +You'll have something. + +269 +00:17:51,808 --> 00:17:53,894 +Did you know Jackie +Sharp's running for whip? + +270 +00:17:53,894 --> 00:17:57,147 +- No, it's the first I'm hearing of it. +- I spoke to Webb. + +271 +00:17:57,147 --> 00:18:01,360 +He got an e-mail from Lorrie Tate about +me. I got one from Dave Holland about him. + +272 +00:18:01,360 --> 00:18:04,571 +- Which means nothing to me. +- The junkets, the nepotism. + +273 +00:18:04,571 --> 00:18:08,200 +Tate and Sharp are close. Holland serves +on the VA Committee with her. + +274 +00:18:08,200 --> 00:18:09,826 +She used proxies +to insulate herself. + +275 +00:18:09,826 --> 00:18:11,995 +You think she gave +the dirt to them. + +276 +00:18:11,995 --> 00:18:14,456 +- She's been playing both of us. +- How many commitments you think + +277 +00:18:14,456 --> 00:18:16,750 +- she could have? +- Around 20 so far. + +278 +00:18:16,750 --> 00:18:19,211 +- So she's a distant third. +- But she's picking people off us + +279 +00:18:19,211 --> 00:18:22,339 +- left and right. I want your help. +- You have my support, Wes. + +280 +00:18:22,339 --> 00:18:26,551 +- Then make that public. - If I come out +for you, Birch comes out for Webb. + +281 +00:18:26,551 --> 00:18:29,096 +- That's gonna hurt you, not help you. +- This is serious, Frank. + +282 +00:18:29,096 --> 00:18:31,390 +Ted Havemeyer +is bankrolling her. + +283 +00:18:31,390 --> 00:18:33,308 +- Have you thought of talking to Jackie? +- No, no. + +284 +00:18:33,308 --> 00:18:36,228 +- I can't do that on principle. +- Why not? + +285 +00:18:36,228 --> 00:18:39,356 +Anyone who Havemeyer is backing, +I don't work with. + +286 +00:18:39,356 --> 00:18:41,441 +He pulled this same crap on me +when I ran for Senate. + +287 +00:18:41,441 --> 00:18:44,027 +He financed my primary opponent. +Asshole. + +288 +00:18:44,027 --> 00:18:46,655 +Well, that is your call. +But if you're gonna let an old grudge + +289 +00:18:46,655 --> 00:18:48,990 +- get in the way of progress... +- I just can't do it, Frank. + +290 +00:18:48,990 --> 00:18:51,618 +Havemeyer's been trying to shove +me down the totem pole for years. + +291 +00:18:51,618 --> 00:18:53,537 +I won't give him +the satisfaction. + +292 +00:18:53,537 --> 00:18:57,040 +Well, I can respect that, +but my hands are tied. + +293 +00:18:57,040 --> 00:19:00,711 +It's a delicate matter, but we are in +communication with the Chinese government + +294 +00:19:00,711 --> 00:19:03,004 +- as to how to move forward. +- This mean the US will back down + +295 +00:19:03,004 --> 00:19:05,340 +- on cyberattacks? +- The United States never backs down, + +296 +00:19:05,340 --> 00:19:08,427 +particularly on issues +that are high priority to us. + +297 +00:19:08,427 --> 00:19:12,848 +Madame Secretary, what did you +tell the head of the delegation? + +298 +00:19:16,184 --> 00:19:18,228 +The delegation +overstepped its bounds. + +299 +00:19:18,228 --> 00:19:20,605 +But Cathy couldn't throw her +own people under the bus. + +300 +00:19:20,605 --> 00:19:23,233 +She should've consulted +us first before speaking publicly. + +301 +00:19:23,233 --> 00:19:26,069 +The press was on her doorstep and +the president was in another hemisphere. + +302 +00:19:26,069 --> 00:19:29,573 +Look, I'm not condoning +what she did, but she had to do something. + +303 +00:19:29,573 --> 00:19:32,117 +She made a gut call +and she acted. + +304 +00:19:32,117 --> 00:19:33,744 +We have to distance +ourselves from this. + +305 +00:19:33,744 --> 00:19:35,871 +- When is the president back? +- Tomorrow morning. + +306 +00:19:35,871 --> 00:19:37,205 +Can we set up a meeting? + +307 +00:19:37,205 --> 00:19:38,999 +Cathy needs +to publicly apologize. + +308 +00:19:38,999 --> 00:19:40,667 +We get her in the room +with the president? + +309 +00:19:40,667 --> 00:19:42,794 +Shouldn't we all be +on the same page first? + +310 +00:19:42,794 --> 00:19:44,755 +- I'll see what I can do. +- Thank you. + +311 +00:19:44,755 --> 00:19:47,215 +Now, you asked me a question +before I went and got my food + +312 +00:19:47,215 --> 00:19:50,135 +- and I've forgotten what... +- Mr. Vice President. General McGinnis. + +313 +00:19:50,135 --> 00:19:53,472 +Ah. It's a great honor. I hope +you don't mind, the president +wishes he could be here. + +314 +00:19:53,472 --> 00:19:55,599 +- He's asked me to fill in. +- The honor is mine, sir. + +315 +00:19:55,599 --> 00:19:59,686 +- And, General, this is my wife Claire. +- It's good to see you, Claire. + +316 +00:19:59,686 --> 00:20:01,938 +- It's been a long time. +- Yes. + +317 +00:20:01,938 --> 00:20:04,816 +- Harvard. We were classmates. +- Claire didn't say a thing. + +318 +00:20:04,816 --> 00:20:09,488 +We dated for a time. +Well, about five minutes. + +319 +00:20:09,488 --> 00:20:11,490 +Anyway, I'll let you +get back to your meal. + +320 +00:20:11,490 --> 00:20:13,909 +Thank you. I've remembered. + +321 +00:20:13,909 --> 00:20:18,246 +Interestingly enough, in South Carolinam, +the largest crop is not cotton. + +322 +00:20:18,246 --> 00:20:23,001 +No. It's tobacco. +And the third largest crop is marijuana. + +323 +00:20:23,001 --> 00:20:24,878 +Now... + +324 +00:20:24,878 --> 00:20:27,130 +We'll just keep +that to ourselves. + +325 +00:20:27,130 --> 00:20:29,299 +Would you all excuse me +for just a moment? + +326 +00:20:30,384 --> 00:20:32,010 +- Is she alone? +- Yes. + +327 +00:20:32,010 --> 00:20:34,429 +Will you give us +a few moments, please. + +328 +00:20:39,393 --> 00:20:41,353 +What's wrong? + +329 +00:20:43,188 --> 00:20:47,025 +- It was him. +- Who? + +330 +00:20:48,985 --> 00:20:51,154 +Freshman year. + +331 +00:20:53,699 --> 00:20:55,617 +You mean...? + +332 +00:20:56,993 --> 00:20:59,830 +McGinnis? + +333 +00:20:59,830 --> 00:21:01,498 +Francis. Francis! + +334 +00:21:01,498 --> 00:21:04,459 +Please, don't do anything, +please! + +335 +00:21:04,459 --> 00:21:06,336 +I am not gonna pin +a medal on that man. + +336 +00:21:06,336 --> 00:21:08,088 +- You have to! +- Just a minute, please! + +337 +00:21:08,088 --> 00:21:10,257 +- There is no way... +- They want to start. + +338 +00:21:10,257 --> 00:21:12,300 +Just a minute, please! +He does not deserve a medal. + +339 +00:21:12,300 --> 00:21:15,137 +- That man needs to be taken out and shot! +- I am begging you. Please! + +340 +00:21:15,137 --> 00:21:19,141 +- No! I said just a minute! +- Do not make a scene! + +341 +00:21:19,141 --> 00:21:21,184 +Please! + +342 +00:21:52,007 --> 00:21:54,885 +Tom. + +343 +00:21:54,885 --> 00:21:57,012 +Thanks for coming by. + +344 +00:22:00,432 --> 00:22:05,395 +You know, I thought I would miss +this place the moment I stepped inside... + +345 +00:22:06,521 --> 00:22:08,648 +...but I don't. + +346 +00:22:11,485 --> 00:22:13,487 +Hope you like Stella. + +347 +00:22:19,951 --> 00:22:22,454 +- Cheers. +- Here's how. + +348 +00:22:29,795 --> 00:22:34,132 +- How are things? +- Ah! They're good. + +349 +00:22:35,592 --> 00:22:37,511 +They're good. + +350 +00:22:39,554 --> 00:22:43,058 +- You're happy? +- I haven't been happy a day in my life. + +351 +00:22:43,058 --> 00:22:47,938 +But I have time now. +To think. To write. + +352 +00:22:47,938 --> 00:22:51,024 +- Been working on a novel. +- Yeah? + +353 +00:22:51,024 --> 00:22:55,237 +Mm. It's absolute shit, +but that's OK. + +354 +00:22:55,237 --> 00:22:58,323 +That's great, Tom. +That's really great. + +355 +00:22:58,323 --> 00:23:02,828 +What's on your mind? I know you +didn't ask me here just to catch up. + +356 +00:23:18,343 --> 00:23:20,303 +Frank Underwood. + +357 +00:23:20,303 --> 00:23:22,848 +On the president's +behalf, it is my great honor + +358 +00:23:22,848 --> 00:23:25,058 +to formally recognize +the selection + +359 +00:23:25,058 --> 00:23:28,270 +of General Alicia Hampton +as commander, + +360 +00:23:28,270 --> 00:23:30,397 +United States European Command, + +361 +00:23:30,397 --> 00:23:33,025 +and General Dalton McGinnis +as commander + +362 +00:23:33,025 --> 00:23:35,569 +of the United States +Strategic Command. + +363 +00:23:35,569 --> 00:23:37,946 +The United States Marine Corps +has been well served + +364 +00:23:37,946 --> 00:23:42,909 +by these two... +exemplary leaders. + +365 +00:23:42,909 --> 00:23:46,496 +The president and I are grateful +for their continued service. + +366 +00:23:56,131 --> 00:23:59,342 +- Congratulations. +- Thank you, sir. + +367 +00:24:38,840 --> 00:24:41,593 +You think I'm insane? + +368 +00:24:41,593 --> 00:24:44,888 +I don't think you're insane. + +369 +00:24:47,599 --> 00:24:51,395 +I think you've been through a lot. +You're trying to make sense of it all. + +370 +00:24:51,395 --> 00:24:55,399 +- I know I'm right. +- I'm sure you believe you are. + +371 +00:24:55,399 --> 00:24:57,818 +It's a fact that he helped +cover up the DUI. + +372 +00:24:57,818 --> 00:25:03,073 +Imagine if one of your reporters +came to you with this story. + +373 +00:25:03,073 --> 00:25:05,701 +- Could you print a word of it? +- No, but I'd have them keep digging. + +374 +00:25:05,701 --> 00:25:07,911 +Would you? If you're +honest with yourself, + +375 +00:25:07,911 --> 00:25:10,163 +wouldn't you tell them it +seemed far-fetched? + +376 +00:25:10,163 --> 00:25:13,417 +Your notes aren't convincing. +The police reports don't prove a link. + +377 +00:25:13,417 --> 00:25:16,420 +- And the speculative leaps you're making? +- I know. + +378 +00:25:16,420 --> 00:25:20,882 +Hold yourself to the same +standards you hold your staff. + +379 +00:25:25,011 --> 00:25:26,638 +You and Zoe +were seeing each other. + +380 +00:25:28,098 --> 00:25:30,684 +I'm assuming. Maybe I'm wrong. + +381 +00:25:34,896 --> 00:25:36,982 +No, we were. + +382 +00:25:46,825 --> 00:25:50,245 +When I lost my first wife, +it didn't add up. + +383 +00:25:50,245 --> 00:25:53,707 +Who dies of breast cancer at 31? + +384 +00:25:53,707 --> 00:25:58,754 +I wanted to sue, doctors, +the hospital, everyone. + +385 +00:25:58,754 --> 00:26:01,506 +I thought they were +hiding something. + +386 +00:26:02,966 --> 00:26:04,843 +No. + +387 +00:26:04,843 --> 00:26:09,723 +Grief demands an answer, +but sometimes there isn't one. + +388 +00:26:11,266 --> 00:26:16,563 +Her life couldn't be saved. +Period. + +389 +00:26:17,731 --> 00:26:19,566 +What do I do? + +390 +00:26:21,026 --> 00:26:23,362 +Would you consider +seeing someone? + +391 +00:26:23,362 --> 00:26:25,864 +There's a therapist who helped +me when Cynthia passed away. + +392 +00:26:25,864 --> 00:26:28,200 +- I can put you in touch with... +- No, I don't need to see somebody. + +393 +00:26:28,200 --> 00:26:32,496 +- Lucas. +- I appreciate you coming by, Tom. + +394 +00:26:33,663 --> 00:26:35,832 +Thanks for the beer. + +395 +00:26:38,210 --> 00:26:39,878 +You can call me anytime. + +396 +00:26:48,261 --> 00:26:50,889 +You take care of yourself, +Lucas. + +397 +00:26:53,433 --> 00:26:55,352 +I mean it. + +398 +00:27:06,863 --> 00:27:09,324 +Any plans to go elsewhere, sir? + +399 +00:27:09,324 --> 00:27:11,243 +No, we're in +for the night. Thank you. + +400 +00:27:11,243 --> 00:27:12,994 +Yes, sir. + +401 +00:27:18,750 --> 00:27:20,544 +Hey. + +402 +00:27:23,505 --> 00:27:25,590 +I'm tired. + +403 +00:28:14,806 --> 00:28:17,225 +Do you need something, sir? + +404 +00:28:17,225 --> 00:28:21,104 +My remote, I wanna play. + +405 +00:28:21,104 --> 00:28:23,357 +It's right over here. + +406 +00:28:25,901 --> 00:28:27,778 +Thank you. + +407 +00:28:34,618 --> 00:28:36,912 +Something wrong with the +Internet? I can't get online. + +408 +00:28:36,912 --> 00:28:40,582 +We had to disable the access. +It's not a secure connection. + +409 +00:28:59,893 --> 00:29:01,978 +Would you just +give me a moment, please? + +410 +00:29:01,978 --> 00:29:05,816 +Whenever you're out here, +somebody needs to be with you. + +411 +00:29:05,816 --> 00:29:09,194 +I can't be alone +in my own backyard? + +412 +00:29:09,194 --> 00:29:12,864 +If it were up to me, sir, +but it's not up to me. + +413 +00:29:18,704 --> 00:29:21,123 +OK, Meechum. + +414 +00:30:03,540 --> 00:30:05,792 +You think I don't +want to smash things? + +415 +00:30:07,586 --> 00:30:11,757 +I know what that anger is +more than you can imagine. + +416 +00:30:14,885 --> 00:30:17,888 +- When he was on top of me... +- - We don't have to talk about it. + +417 +00:30:17,888 --> 00:30:20,182 +No, I want to. + +418 +00:30:23,477 --> 00:30:27,064 +When he was on top of me, +I pressed my hand... + +419 +00:30:29,941 --> 00:30:35,447 +...with everything I could, +I pressed it into his face. + +420 +00:30:35,447 --> 00:30:39,034 +I pressed it so hard, +I broke his nose. + +421 +00:30:39,868 --> 00:30:42,412 +That didn't stop him. + +422 +00:30:44,623 --> 00:30:49,127 +He shoved the sheets in my +mouth. I could barely breathe. + +423 +00:30:55,342 --> 00:31:00,597 +Every time I think of her, +pinned down like that, + +424 +00:31:00,597 --> 00:31:06,645 +I strangle her, Francis... +so she doesn't strangle me. + +425 +00:31:08,480 --> 00:31:11,108 +I have to. + +426 +00:31:11,108 --> 00:31:13,151 +We have to. + +427 +00:31:15,862 --> 00:31:18,407 +The alternative is... + +428 +00:31:19,741 --> 00:31:22,035 +...it's unlivable. + +429 +00:31:26,873 --> 00:31:29,376 +You should go to sleep. + +430 +00:31:32,963 --> 00:31:36,258 +I'm not sure if I can. + +431 +00:31:36,258 --> 00:31:39,344 +Then you should +go back downstairs. + +432 +00:31:55,527 --> 00:31:58,697 +You'll still feel +the hate in the morning. + +433 +00:31:59,781 --> 00:32:01,992 +You'll use that. + +434 +00:32:01,992 --> 00:32:04,578 +But not on him. + +435 +00:32:15,213 --> 00:32:18,383 +What did you +communicate, exactly? + +436 +00:32:18,383 --> 00:32:22,220 +I told him to bring up the agenda, +suggest bullet points for the SED, + +437 +00:32:22,220 --> 00:32:26,391 +- but make no demands. - And how did that +translate into a direct ultimatum? + +438 +00:32:26,391 --> 00:32:29,978 +Well, sometimes my delegates +try to read between the lines. + +439 +00:32:29,978 --> 00:32:33,440 +They know that I need plausible +deniability for diplomatic purposes. + +440 +00:32:33,440 --> 00:32:34,816 +Why didn't you +immediately recant? + +441 +00:32:34,816 --> 00:32:36,568 +In my experience with +the Chinese, + +442 +00:32:36,568 --> 00:32:39,279 +backpedaling makes us +look weak. I had two choices: + +443 +00:32:39,279 --> 00:32:43,867 +lose face or exhibit strength. +I chose the latter. + +444 +00:32:43,867 --> 00:32:47,579 +- All right, I'll be in touch shortly. +- Thank you, sir. + +445 +00:32:55,754 --> 00:32:58,465 +Get me Raymond +on the private line. + +446 +00:33:02,135 --> 00:33:05,013 +- Think she overstepped on purpose? +- Cathy would never disobey. + +447 +00:33:05,013 --> 00:33:08,433 +- Not on purpose. +- Raymond, I've got Frank here. + +448 +00:33:08,433 --> 00:33:11,895 +- Just the three of us? +- Just us three. Morning, Raymond. + +449 +00:33:11,895 --> 00:33:16,775 +My contacts in Beijing tell me +the minister of commerce is in a tizzy. + +450 +00:33:16,775 --> 00:33:20,153 +Wants to use this as an excuse +to start clenching fists. + +451 +00:33:20,153 --> 00:33:22,572 +Either I turn my back on Cathy +or I stand behind her. + +452 +00:33:22,572 --> 00:33:25,742 +- It's got to be the former. +- I agree. If you don't apologize, + +453 +00:33:25,742 --> 00:33:28,578 +you go from ruffling feathers +to plucking them. + +454 +00:33:28,578 --> 00:33:30,914 +And the Chinese won't +stand for that, Mr. President. + +455 +00:33:30,914 --> 00:33:33,291 +What about perceived miscommunication +between me and my Cabinet? + +456 +00:33:33,291 --> 00:33:36,420 +Mr. President, right now +the goal is to resume the talks. + +457 +00:33:36,420 --> 00:33:38,463 +I wouldn't worry +about perceptions. + +458 +00:33:38,463 --> 00:33:40,132 +Frank is right. +We need to be pragmatic. + +459 +00:33:40,132 --> 00:33:42,217 +Worry about appearances later. + +460 +00:33:45,721 --> 00:33:48,098 +All right, I'll have Catherine +draft an apology. + +461 +00:33:48,098 --> 00:33:50,726 +No, it has to come +from you, Mr. President. + +462 +00:33:50,726 --> 00:33:53,687 +If the apology is to mean anything, +it must come from the White House. + +463 +00:33:53,687 --> 00:33:56,356 +That is certainly +the more likely to succeed. + +464 +00:33:59,651 --> 00:34:01,153 +Fine. I'll do it, then. + +465 +00:34:01,153 --> 00:34:04,197 +- Thank you, Raymond. +- Thank you, Garrett. + +466 +00:34:05,949 --> 00:34:09,494 +Do you hear how he still +uses the President's given name? + +467 +00:34:09,494 --> 00:34:14,082 +And that Walker doesn't flinch +at the lack of respect it implies? + +468 +00:34:16,793 --> 00:34:21,214 +Sir, forgive me if this isn't +the case, but you seem a bit hesitant. + +469 +00:34:21,214 --> 00:34:24,134 +- Why do you say that? +- Well, you've raised a good point + +470 +00:34:24,134 --> 00:34:26,511 +about public perception. +I don't want you to think + +471 +00:34:26,511 --> 00:34:30,640 +- that I'm dismissing your concerns +casually. - It's a concern for you, too? + +472 +00:34:30,640 --> 00:34:36,229 +- There is some insight into what Cathy +brought up. - Backpedaling as weakness. + +473 +00:34:38,523 --> 00:34:41,151 +Well, it's always a coin toss +with the Chinese. + +474 +00:34:41,151 --> 00:34:46,031 +But sometimes, standing your +ground is better than giving in. + +475 +00:34:46,031 --> 00:34:49,326 +They respect you more +when you show strength. + +476 +00:34:49,326 --> 00:34:52,537 +Are you changing +your mind on this, Frank? + +477 +00:34:52,537 --> 00:34:57,084 +I just think it's important +that you do what you think is best. + +478 +00:34:57,084 --> 00:35:02,005 +The American people voted you +president, not me, not Raymond Tusk. + +479 +00:35:04,007 --> 00:35:07,052 +- I'll let you know what I decide. +- Thank you, sir. + +480 +00:35:12,140 --> 00:35:15,102 +You think she's +Underwood's choice? + +481 +00:35:15,102 --> 00:35:17,312 +He deflected, so it's possible. + +482 +00:35:24,027 --> 00:35:28,448 +You and I, we need +to work together on this, Wes. + +483 +00:35:28,448 --> 00:35:31,451 +- Before we both get screwed. +- I agree. + +484 +00:35:34,454 --> 00:35:38,959 +One of us drops out, +throws support to the other. + +485 +00:35:38,959 --> 00:35:41,586 +That'll dwarf +any following she has. + +486 +00:35:41,586 --> 00:35:44,756 +You want me to drop out. + +487 +00:35:44,756 --> 00:35:47,134 +I'll make sure you get my +chairmanship on Appropriations. + +488 +00:35:50,721 --> 00:35:54,808 +All you can offer me is Ethics, +which nobody wants. + +489 +00:35:58,353 --> 00:36:00,856 +Let's put this to bed, Wes. + +490 +00:36:04,151 --> 00:36:06,028 +Webb must have +offered him a deal. + +491 +00:36:06,028 --> 00:36:07,529 +Then we have +to offer a better one. + +492 +00:36:07,529 --> 00:36:09,072 +I'm guessing Appropriations. + +493 +00:36:09,072 --> 00:36:10,407 +There's no way I can top that. + +494 +00:36:10,407 --> 00:36:12,117 +Except for Ways and Means. + +495 +00:36:15,120 --> 00:36:18,081 +I won't let you give your chair +to an ass like Buchwalter. + +496 +00:36:18,081 --> 00:36:20,876 +If you're the whip, you outrank +him and every other chairman. + +497 +00:36:20,876 --> 00:36:24,004 +Screw committees. I'll have a +direct line to the Speaker. + +498 +00:36:24,004 --> 00:36:28,008 +- Don't be stubborn, Jackie. +- You think he'd take it? + +499 +00:36:28,008 --> 00:36:29,718 +He was willing +to take a deal from Webb. + +500 +00:36:29,718 --> 00:36:32,304 +You're the only person +he hates more. + +501 +00:36:32,304 --> 00:36:36,600 +He's a brute, +but he's not an idiot. + +502 +00:36:44,566 --> 00:36:46,818 +Well, I know you're not +refusing out of loyalty. + +503 +00:36:46,818 --> 00:36:51,114 +- True. +- So it's because of Ted. + +504 +00:36:54,534 --> 00:36:57,829 +You think you are hot shit, +don't you? + +505 +00:36:57,829 --> 00:37:02,501 +Can we set egos aside and +talk business like the adults we are? + +506 +00:37:04,753 --> 00:37:07,964 +- I want more than Ways and Means. +- Tell me. + +507 +00:37:07,964 --> 00:37:12,052 +I want Havemeyer gone. +Not just retired... + +508 +00:37:16,848 --> 00:37:19,101 +...politically dead. + +509 +00:37:19,101 --> 00:37:21,228 +That race was 12 years ago. + +510 +00:37:21,228 --> 00:37:23,814 +That was 12 years +I could've been in the Senate. + +511 +00:37:23,814 --> 00:37:28,777 +Revenge? Really? + +512 +00:37:28,777 --> 00:37:31,113 +Not revenge. + +513 +00:37:32,572 --> 00:37:34,449 +Equity. + +514 +00:37:36,118 --> 00:37:39,830 +- Well, what are you gonna do? +- Buchwalter won't budge. + +515 +00:37:39,830 --> 00:37:44,084 +You know, there's nothing +I despise more in life than pettiness. + +516 +00:37:44,084 --> 00:37:47,087 +I could approach Webb, +but I don't have enough to offer him. + +517 +00:37:47,087 --> 00:37:50,507 +He'd never drop out. +Too much pride. + +518 +00:37:50,507 --> 00:37:54,052 +- I'm not sure what to do. +- This is my file on Ted. + +519 +00:37:54,052 --> 00:37:57,139 +An illegitimate daughter. +The nanny, of course. + +520 +00:37:57,139 --> 00:38:01,018 +Her name is Emily Rodriguez. +Nineteen, cerebral palsy. + +521 +00:38:01,018 --> 00:38:03,145 +I know about Emily. + +522 +00:38:05,814 --> 00:38:08,734 +- Why are we having this conversation? +- It's complicated. + +523 +00:38:08,734 --> 00:38:11,903 +The daughter? It's very +black-and-white to me. + +524 +00:38:11,903 --> 00:38:16,283 +I've known Ted since I was born. +He and my father were very close. + +525 +00:38:16,283 --> 00:38:19,286 +- Yeah, I'm aware. +- He's always looked out for me. + +526 +00:38:19,286 --> 00:38:21,997 +He got me into West Point. +He funded my first race. + +527 +00:38:21,997 --> 00:38:24,207 +I like Ted. He's always +been a team player. + +528 +00:38:24,207 --> 00:38:26,835 +- It's unfortunate he has this secret. +- It was a mistake. + +529 +00:38:26,835 --> 00:38:29,212 +One he's always regretted. +After she was born, + +530 +00:38:29,212 --> 00:38:31,965 +he asked me to check in on her +because he couldn't. + +531 +00:38:31,965 --> 00:38:37,179 +- Because he trusted me. +- I see. + +532 +00:38:37,179 --> 00:38:40,432 +You came in here knowing +what you had to do, + +533 +00:38:40,432 --> 00:38:43,226 +hoping I would pull a rabbit +out of a hat so you wouldn't have to. + +534 +00:38:43,226 --> 00:38:48,357 +I know the girl. I know her mother. +These people don't deserve this. + +535 +00:38:48,357 --> 00:38:51,526 +I've given you all I can. +Whatever you decide is your prerogative. + +536 +00:38:51,526 --> 00:38:56,198 +- But maybe I misjudged you. +- Ted is family to me. + +537 +00:38:56,198 --> 00:38:59,951 +An adopted daughter, +in lieu of a real one. + +538 +00:38:59,951 --> 00:39:02,913 +- Sir, the secretary is here. +- Thank you. Send her in. + +539 +00:39:02,913 --> 00:39:05,290 +Excuse us. + +540 +00:39:15,759 --> 00:39:17,636 +- It's good. +- Not too long? + +541 +00:39:17,636 --> 00:39:19,930 +A little bit, but not much. + +542 +00:39:19,930 --> 00:39:24,267 +- This part, three paragraphs in. +- About the phone companies? + +543 +00:39:24,267 --> 00:39:27,646 +- Tell me more. - It's one of +Homeland Security's major concerns. + +544 +00:39:27,646 --> 00:39:30,315 +That the cyberattacks might +infiltrate phone carriers, + +545 +00:39:30,315 --> 00:39:32,651 +get access to millions +of people's data history. + +546 +00:39:32,651 --> 00:39:35,028 +- Like who they called? +- Yeah. Who they called, texted, + +547 +00:39:35,028 --> 00:39:38,115 +what they texted, when, +where they were. Everything. + +548 +00:39:38,115 --> 00:39:42,202 +- And that's possible? - There haven't been +any catastrophic breaches yet. + +549 +00:39:42,202 --> 00:39:44,871 +At least not reported. +But it looks like the Chinese are starting + +550 +00:39:44,871 --> 00:39:47,582 +to recruit mercenaries on the Deep Web +to launch guerilla-type attacks + +551 +00:39:47,582 --> 00:39:50,085 +- that can't be traced back... +- Hold on. The "Deep Web." + +552 +00:39:50,085 --> 00:39:52,879 +- I've heard of that. +- Yeah, no, 96 percent of the Internet + +553 +00:39:52,879 --> 00:39:55,882 +isn't accessible through standard +search engines. Most of it's useless. + +554 +00:39:55,882 --> 00:39:58,927 +But it's where you go to find +anything and everything: + +555 +00:39:58,927 --> 00:40:03,265 +child porn, bitcoin laundering, +mail-order narcotics, hackers for hire. + +556 +00:40:03,265 --> 00:40:05,892 +- How do you access it? +- It's actually pretty easy. + +557 +00:40:05,892 --> 00:40:08,395 +- I could show you if you want. +- Yeah, I'm curious. + +558 +00:40:08,395 --> 00:40:10,522 +- Mind if I...? +- Go ahead. + +559 +00:40:10,522 --> 00:40:12,399 +First thing you need's Tor. + +560 +00:40:12,399 --> 00:40:15,652 +Some people prefer I2P, +but I think Tor is better. + +561 +00:40:15,652 --> 00:40:20,657 +- What is Tor? - Protects you through +proxy servers, keeps you anonymous. + +562 +00:40:20,657 --> 00:40:23,118 +Then I'll show how to get +to the posting boards and the IRCs. + +563 +00:40:23,118 --> 00:40:28,874 +But I gotta warn you, be careful +what you click. Some crazy shit there, man. + +564 +00:40:28,874 --> 00:40:32,878 +For too long, +we've danced on eggshells + +565 +00:40:32,878 --> 00:40:35,881 +regarding the issue +of cyberwarfare. + +566 +00:40:35,881 --> 00:40:42,304 +Secretary Durant acted on instructions +that came directly from me. + +567 +00:40:42,304 --> 00:40:45,390 +Now, if the Chinese are not willing +to engage in a meaningful dialogue + +568 +00:40:45,390 --> 00:40:47,976 +about intellectual property +of American corporations, + +569 +00:40:47,976 --> 00:40:52,522 +as well as this deliberate targeting of +our government's online infrastructure, + +570 +00:40:52,522 --> 00:40:55,275 +well, then that is proof +of a double-standard mentality + +571 +00:40:55,275 --> 00:40:57,402 +that we shall +no longer tolerate. + +572 +00:40:57,402 --> 00:41:01,281 +Our delegation to the Joint Commission +on Commerce and Trade + +573 +00:41:01,281 --> 00:41:04,701 +was unfairly accused and defamed + +574 +00:41:04,701 --> 00:41:08,705 +by representatives of the +United States government. + +575 +00:41:08,705 --> 00:41:10,665 +The People's Republic of China + +576 +00:41:10,665 --> 00:41:16,129 +will not be threatened by +derisive and unsubstantiated claims. + +577 +00:41:16,129 --> 00:41:20,258 +As long as the White House +continues to behave this way, + +578 +00:41:20,258 --> 00:41:25,305 +any future bilateral trade +talks will be impossible. + +579 +00:41:25,305 --> 00:41:27,224 +It caught me by surprise, too. + +580 +00:41:27,224 --> 00:41:30,268 +Did you say anything to him +after I hung up yesterday? + +581 +00:41:30,268 --> 00:41:33,522 +- No. Have you spoken to him? +- A few minutes ago. + +582 +00:41:33,522 --> 00:41:35,816 +He said he did +what he thought was right. + +583 +00:41:35,816 --> 00:41:38,068 +Well, there's nothing +we can do to combat that. + +584 +00:41:38,068 --> 00:41:42,114 +He doesn't usually go against +my advice without giving me fair warning. + +585 +00:41:42,114 --> 00:41:47,077 +- What are you suggesting, Raymond? +- He's easily manipulated. + +586 +00:41:47,077 --> 00:41:49,913 +- Clearly, not in this case. +- We need to fix this. + +587 +00:41:49,913 --> 00:41:53,417 +- And I'm counting on you for that, Frank. +- Let me freshen your memory. + +588 +00:41:53,417 --> 00:41:57,713 +I don't owe you any favors. +I promised to work with you, not for you. + +589 +00:41:57,713 --> 00:42:00,006 +And when it comes to China, +we both want the same thing. + +590 +00:42:00,006 --> 00:42:03,510 +- So we need to work together. +- To convince Garrett he should retract. + +591 +00:42:03,510 --> 00:42:05,762 +To support the president +in the path that he's chosen. + +592 +00:42:05,762 --> 00:42:08,515 +While he continues +to antagonize them publicly. + +593 +00:42:08,515 --> 00:42:11,435 +While he continues to benefit +from a bump in approval ratings. + +594 +00:42:11,435 --> 00:42:15,939 +A tough stance on China is popular, +and we can use that to our advantage. + +595 +00:42:15,939 --> 00:42:19,026 +Let's just be patient and see if we can +smooth things over from back channels. + +596 +00:42:19,026 --> 00:42:21,903 +If I don't see any results, +you won't have my patience for long. + +597 +00:42:21,903 --> 00:42:26,742 +- That's understood. +- Let me know what Durant has to say. + +598 +00:42:26,742 --> 00:42:30,078 +- Absolutely. +- Thank you, Mr. Vice President. + +599 +00:42:33,248 --> 00:42:37,294 +I thought he might balk +at taking a handout from me. + +600 +00:42:37,294 --> 00:42:39,171 +I'd call it more than a handout. + +601 +00:42:39,171 --> 00:42:44,092 +Well, he's always been the sort of man +who could be bought, + +602 +00:42:44,092 --> 00:42:46,470 +but never cheaply. + +603 +00:42:46,470 --> 00:42:50,265 +It's not the chairmanship +that bought him, Ted. + +604 +00:42:50,265 --> 00:42:52,309 +What do you mean? + +605 +00:42:52,309 --> 00:42:55,645 +I'm telling you this so that +you have time to call your wife + +606 +00:42:55,645 --> 00:42:57,814 +and prepare your statement. + +607 +00:43:05,197 --> 00:43:08,325 +What's my out? +What's he want from me? + +608 +00:43:08,325 --> 00:43:11,078 +There is no out. +He wants it to hurt. + +609 +00:43:13,413 --> 00:43:15,415 +- You told him? +- I just promised him + +610 +00:43:15,415 --> 00:43:19,002 +- that I could make it happen. +- You can't do this, Jackie. + +611 +00:43:19,002 --> 00:43:22,047 +The story's breaking tomorrow. + +612 +00:43:22,047 --> 00:43:25,967 +- What part of it? +- No names. Just that you have a daughter. + +613 +00:43:25,967 --> 00:43:29,513 +Have you thought about +what this will do to Diane? + +614 +00:43:29,513 --> 00:43:33,600 +- To our sons? +- I hate myself for it. + +615 +00:43:33,600 --> 00:43:36,853 +- But I'll get over that. +- What about her? + +616 +00:43:36,853 --> 00:43:41,024 +- Emily? You can't even say +her name, can you? - Don't lecture me. + +617 +00:43:41,024 --> 00:43:42,609 +You've never been +in the same room with her. + +618 +00:43:42,609 --> 00:43:45,028 +She's had the best +treatment available. + +619 +00:43:45,028 --> 00:43:47,114 +Alone. Hooked up +to machines. + +620 +00:43:47,114 --> 00:43:49,616 +Surrounded by nurses +who punch out at dinnertime. + +621 +00:43:49,616 --> 00:43:52,452 +- You don't know what I've been through. +- You? What about her? + +622 +00:43:52,452 --> 00:43:56,623 +- I can't do more than I've done. +- That's bullshit, Ted. + +623 +00:43:56,623 --> 00:43:59,209 +- You could've found a way. +- I won't defend myself to you. + +624 +00:43:59,209 --> 00:44:01,920 +Don't. Save that +for your wife. + +625 +00:44:06,216 --> 00:44:09,469 +This isn't to punish you, Ted. +It's simpler than that. + +626 +00:44:09,469 --> 00:44:11,513 +When I first encouraged +you to run for office, + +627 +00:44:11,513 --> 00:44:15,434 +it's because I sensed +how unstoppable you were. + +628 +00:44:15,434 --> 00:44:21,189 +But I never thought I'd have +to lie down on the tracks myself. + +629 +00:44:22,524 --> 00:44:26,069 +If you're going to put +my neck in the noose, + +630 +00:44:26,069 --> 00:44:30,282 +look me in the eye +while you do it. + +631 +00:44:38,582 --> 00:44:42,127 +I'm very grateful +for all that you've done for me. + +632 +00:44:42,127 --> 00:44:45,047 +You'll make an excellent +whip, Jacqueline. + +633 +00:44:45,047 --> 00:44:48,133 +Now, please +get out of my office. + +634 +00:45:03,523 --> 00:45:05,859 +What are you doing? + +635 +00:45:07,027 --> 00:45:09,363 +Sh, sh, sh, sh! + +636 +00:45:16,745 --> 00:45:20,332 +It's finally quiet. + +637 +00:45:22,918 --> 00:45:26,797 +It is, isn't it? + +638 +00:45:26,797 --> 00:45:30,592 +We have our fortress now. + +639 +00:45:30,592 --> 00:45:33,887 +- Where are you coming from? +- My new office. + +640 +00:45:33,887 --> 00:45:36,431 +You just finished +setting it up today. + +641 +00:45:36,431 --> 00:45:40,310 +- Do you like it? +- It's an office. It's fine. + +642 +00:46:26,231 --> 00:58:46,913 +Subtitles by MemoryOnSmells +ReSync by Iar +http://UKsubtitles.ru. +http://TV4User.de + +9999 +00:00:0,500 --> 00:00:2,00 +www.tvsubtitles.net diff --git a/tests/integration/SrtFileTest.php b/tests/integration/SrtFileTest.php deleted file mode 100644 index 3d53c82..0000000 --- a/tests/integration/SrtFileTest.php +++ /dev/null @@ -1,34 +0,0 @@ -assertEquals(file_get_contents($file_location), $new_file); - } - - public function dpCorrectSrtFiles () - { - return [ - [__DIR__ . "/../full.srt"], - [__DIR__ . "/../empty.srt"], - [__DIR__ . "/../single.srt"], - [__DIR__ . "/../non-utf8-win-eol.srt"] - ]; - } -} \ No newline at end of file diff --git a/tests/integration/SubRip/FileTest.php b/tests/integration/SubRip/FileTest.php new file mode 100644 index 0000000..6babc9c --- /dev/null +++ b/tests/integration/SubRip/FileTest.php @@ -0,0 +1,36 @@ +assertEquals($file_contents, $new_file_contents); + $this->assertEquals($file_contents, SubRip\Writer::writeFileToString($srt_file)); + } + + public function dpCorrectSrtFiles () + { + return [ + [__DIR__ . "/../../full.srt"], + [__DIR__ . "/../../empty.srt"], + [__DIR__ . "/../../single.srt"], + [__DIR__ . "/../../non-utf8-win-eol.srt"], + ]; + } +} \ No newline at end of file diff --git a/tests/unittests/SubRip/ModifierTest.php b/tests/unittests/SubRip/ModifierTest.php index cd2c681..40f073b 100644 --- a/tests/unittests/SubRip/ModifierTest.php +++ b/tests/unittests/SubRip/ModifierTest.php @@ -47,9 +47,16 @@ public function testAddDelayInMsWorksForNegativeDelays () $this->assertEquals("00:07:24,442", $srt_file->getSubtitles()[0]->getFormattedStopTime()); } - public function testAddDelayInMSWorksOnAllSubtitlesInFile () + /** + * @dataProvider dpReadableFilesAndSubtitleCount + * + * @param string $file_location + * @param int $expected_subtitle_count + */ + public function testAddDelayInMSWorksOnAllSubtitlesInFile ($file_location, $expected_subtitle_count) { - $srt_file = SubRip\Reader::readFile(__DIR__ . "/../../full.srt"); + $srt_file = SubRip\Reader::readFile($file_location); + $this->assertSame($expected_subtitle_count, $srt_file->subtitleCount()); $deep_copy = new \DeepCopy\DeepCopy(); $subtitles = []; @@ -78,7 +85,16 @@ private function assertSubtitlesHaveBeenDelayed (array $subtitles, array $delaye { $subtitles[$i]->addDelayInMilliseconds($delay_in_ms); - $this->assertEquals($delayed_subtitles[$i]->toString(), $subtitles[$i]->toString()); + $this->assertEquals($delayed_subtitles[$i]->start_time->toString(), $subtitles[$i]->start_time->toString()); + $this->assertEquals($delayed_subtitles[$i]->stop_time->toString(), $subtitles[$i]->stop_time->toString()); } } + + public function dpReadableFilesAndSubtitleCount () + { + return [ + [__DIR__ . "/../../bad_format_hoc_s02e02_full.srt", 643], + [__DIR__ . "/../../full.srt", 746], + ]; + } } \ No newline at end of file