From 333217f43e58f93fc8088d4854044b907adddce5 Mon Sep 17 00:00:00 2001 From: Felix S Date: Fri, 23 Apr 2021 10:52:21 +0200 Subject: [downloader/hls] Remove duplicate cues using a sliding window of candidates --- yt_dlp/webvtt.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'yt_dlp/webvtt.py') diff --git a/yt_dlp/webvtt.py b/yt_dlp/webvtt.py index 4d026834a..a184ee369 100644 --- a/yt_dlp/webvtt.py +++ b/yt_dlp/webvtt.py @@ -322,6 +322,16 @@ class CueBlock(Block): stream.write(self.text) stream.write('\n') + @property + def as_json(self): + return { + 'id': self.id, + 'start': self.start, + 'end': self.end, + 'text': self.text, + 'settings': self.settings, + } + def parse_fragment(frag_content): """ -- cgit v1.2.3