diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-01-30 19:43:25 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-01-30 19:43:25 +0600 |
commit | b8c9926c0a9d68fb636bf99e873d6a88de41f76b (patch) | |
tree | 6f835a7b1954f33b10516110064889db6761ef5a | |
parent | 2c2f1efdcd37f88196bb2b546e6d8bc7c22f3b6a (diff) |
[downloader/f4m] Do not update fragment list while test
-rw-r--r-- | youtube_dl/downloader/f4m.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/downloader/f4m.py b/youtube_dl/downloader/f4m.py index 581fa7b71..fc9642905 100644 --- a/youtube_dl/downloader/f4m.py +++ b/youtube_dl/downloader/f4m.py @@ -322,7 +322,8 @@ class F4mFD(FragmentFD): metadata = None fragments_list = build_fragments_list(boot_info) - if self.params.get('test', False): + test = self.params.get('test', False) + if test: # We only download the first fragment fragments_list = fragments_list[:1] total_frags = len(fragments_list) @@ -387,7 +388,7 @@ class F4mFD(FragmentFD): else: raise - if not fragments_list and live and bootstrap_url: + if not fragments_list and not test and live and bootstrap_url: fragments_list = self._update_live_fragments(bootstrap_url, frag_i) total_frags += len(fragments_list) if fragments_list and (fragments_list[0][1] > frag_i + 1): |