From 98c70d6fc7006c8cbbd76fb1b8661d758fc4f5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Sun, 22 Feb 2015 11:37:27 +0100 Subject: [YoutubeDL] only add normal subtitles to the 'requested_subtitles' field if 'writesubtitles' is True --- test/test_YoutubeDL.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index e11292211..055e42555 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -389,6 +389,13 @@ class TestFormatSelection(unittest.TestCase): self.assertFalse(subs['es']['_auto']) self.assertTrue(subs['pt']['_auto']) + result = get_info({'writeautomaticsub': True, 'subtitleslangs': ['es', 'pt']}) + subs = result['requested_subtitles'] + self.assertTrue(subs) + self.assertEqual(set(subs.keys()), set(['es', 'pt'])) + self.assertTrue(subs['es']['_auto']) + self.assertTrue(subs['pt']['_auto']) + def test_add_extra_info(self): test_dict = { 'extractor': 'Foo', -- cgit v1.2.3