]> jfr.im git - yt-dlp.git/commitdiff
Fix `--skip-unavailable-fragments`
authorpukkandan <redacted>
Fri, 15 Apr 2022 18:13:07 +0000 (23:43 +0530)
committerpukkandan <redacted>
Fri, 15 Apr 2022 18:17:37 +0000 (23:47 +0530)
Bug in d71fd412495af9ebccef807379859a0baa97ddee
Closes #3437

yt_dlp/downloader/fragment.py

index e5bc23e54e96e5b96c1705403e15eb046b508290..9012a1795b1f12eb9ad42d3c3d7cea17d6265017 100644 (file)
@@ -134,6 +134,8 @@ def _download_fragment(self, ctx, frag_url, info_dict, headers=None, request_dat
         return True
 
     def _read_fragment(self, ctx):
+        if not ctx.get('fragment_filename_sanitized'):
+            return None
         try:
             down, frag_sanitized = self.sanitize_open(ctx['fragment_filename_sanitized'], 'rb')
         except FileNotFoundError: