1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-25 12:12:55 +08:00

[downloader/f4m] Skip fragment downloading in test (Closes #9214)

This commit is contained in:
Sergey M․ 2016-04-16 23:57:05 +06:00
parent 663ee5f0a9
commit 3c3d9b78f9
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -328,8 +328,11 @@ class F4mFD(FragmentFD):
fragments_list = build_fragments_list(boot_info)
test = self.params.get('test', False)
if test:
# We only download the first fragment
fragments_list = fragments_list[:1]
# We will not download any fragments during test since truncated
# fragment file may introduce bogus parse error in FlvReader thus
# making the whole test to fail erroneously
return True
total_frags = len(fragments_list)
# For some akamai manifests we'll need to add a query to the fragment url
akamai_pv = xpath_text(doc, _add_ns('pv-2.0'))