Skip to content

Commit

Permalink
[webvtt] Don't parse single fragment files (#9034)
Browse files Browse the repository at this point in the history
Partially addresses #5804
Authored by: seproDev
  • Loading branch information
seproDev committed Jan 20, 2024
1 parent 811d298 commit f24e44e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions yt_dlp/downloader/hls.py
Expand Up @@ -369,7 +369,10 @@ def fin_fragments():

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)

0 comments on commit f24e44e

Please sign in to comment.