]> jfr.im git - yt-dlp.git/blobdiff - youtube_dl/downloader/f4m.py
[refactor] Single quotes consistency
[yt-dlp.git] / youtube_dl / downloader / f4m.py
index f8da04f6916ed46f647ec26be835279a4142b2b8..fc9642905f3fffb5f1ec11f959c36fd486b757f2 100644 (file)
@@ -322,7 +322,8 @@ def real_download(self, filename, info_dict):
             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)
@@ -332,6 +333,7 @@ def real_download(self, filename, info_dict):
         ctx = {
             'filename': filename,
             'total_frags': total_frags,
+            'live': live,
         }
 
         self._prepare_frag_download(ctx)
@@ -386,7 +388,7 @@ def real_download(self, filename, info_dict):
                 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):