aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsepro <4618135+seproDev@users.noreply.github.com>2024-01-20 06:08:55 +0100
committerGitHub <noreply@github.com>2024-01-20 06:08:55 +0100
commitf24e44e8cbd88ce338d52f594a19330f64d38b50 (patch)
tree31a59a40d14bbefaed73865845f06d1fa6f18fce
parent811d298b231cfa29e75c321b23a91d1c2b17602c (diff)
[webvtt] Don't parse single fragment files (#9034)
Partially addresses #5804 Authored by: seproDev
-rw-r--r--yt_dlp/downloader/hls.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/yt_dlp/downloader/hls.py b/yt_dlp/downloader/hls.py
index d4b3f0320..4ac5d99dc 100644
--- a/yt_dlp/downloader/hls.py
+++ b/yt_dlp/downloader/hls.py
@@ -369,7 +369,10 @@ class HlsFD(FragmentFD):
return output.getvalue().encode()
- self.download_and_append_fragments(
- ctx, fragments, info_dict, pack_func=pack_fragment, finish_func=fin_fragments)
+ if len(fragments) == 1:
+ self.download_and_append_fragments(ctx, fragments, info_dict)
+ else:
+ self.download_and_append_fragments(
+ ctx, fragments, info_dict, pack_func=pack_fragment, finish_func=fin_fragments)
else:
return self.download_and_append_fragments(ctx, fragments, info_dict)