[downloader/f4m] Do not update fragment list while test

This commit is contained in:
Sergey M․ 2016-01-30 19:43:25 +06:00
parent 2c2f1efdcd
commit b8c9926c0a

View file

@ -322,7 +322,8 @@ def real_download(self, filename, info_dict):
metadata = None metadata = None
fragments_list = build_fragments_list(boot_info) 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 # We only download the first fragment
fragments_list = fragments_list[:1] fragments_list = fragments_list[:1]
total_frags = len(fragments_list) total_frags = len(fragments_list)
@ -387,7 +388,7 @@ def real_download(self, filename, info_dict):
else: else:
raise 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) fragments_list = self._update_live_fragments(bootstrap_url, frag_i)
total_frags += len(fragments_list) total_frags += len(fragments_list)
if fragments_list and (fragments_list[0][1] > frag_i + 1): if fragments_list and (fragments_list[0][1] > frag_i + 1):