Skip to content

A feature-rich command-line audio/video downloader

[downloader/hls] Fix total fragments count when ad fragments exist

Sergey M․a9ee4f6e49a5
diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.py
index 7955ca510d..1a6e226c89 100644
--- a/youtube_dl/downloader/hls.py
+++ b/youtube_dl/downloader/hls.py
@@ -88,6 +88,7 @@ class HlsFD(FragmentFD):
if line.startswith('#'):
if anvato_ad(line):
ad_frags += 1
+ ad_frag_next = True
continue
if ad_frag_next:
ad_frag_next = False