diff options
author | Felix S <felix.von.s@posteo.de> | 2021-04-23 10:52:21 +0200 |
---|---|---|
committer | Felix S <felix.von.s@posteo.de> | 2021-04-28 17:21:26 +0530 |
commit | 333217f43e58f93fc8088d4854044b907adddce5 (patch) | |
tree | 0f279e5deb01ad65b6baa0b8a097cef59ab280cc /yt_dlp/webvtt.py | |
parent | 4a2f19abbd61274358211c2e3b1d9658cfbdcdde (diff) | |
download | hypervideo-pre-333217f43e58f93fc8088d4854044b907adddce5.tar.lz hypervideo-pre-333217f43e58f93fc8088d4854044b907adddce5.tar.xz hypervideo-pre-333217f43e58f93fc8088d4854044b907adddce5.zip |
[downloader/hls] Remove duplicate cues using a sliding window of candidates
Diffstat (limited to 'yt_dlp/webvtt.py')
-rw-r--r-- | yt_dlp/webvtt.py | 10 |
1 files changed, 10 insertions, 0 deletions
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): """ |