mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-02-07 02:29:48 +00:00
Don't add preceding newline when converting TTML to SRT
This commit is contained in:
parent
405947c32e
commit
7ecd95aa91
@ -2850,6 +2850,9 @@ def dfxp2srt(dfxp_data):
|
|||||||
index_offset += 1
|
index_offset += 1
|
||||||
out.append('%s\n' % (parse_node(para)))
|
out.append('%s\n' % (parse_node(para)))
|
||||||
else:
|
else:
|
||||||
|
if out:
|
||||||
|
out.append('\n')
|
||||||
|
out.append('%d\n%s --> %s\n%s\n' % (
|
||||||
index - index_offset,
|
index - index_offset,
|
||||||
srt_subtitles_timecode(begin_time),
|
srt_subtitles_timecode(begin_time),
|
||||||
srt_subtitles_timecode(end_time),
|
srt_subtitles_timecode(end_time),
|
||||||
|
Loading…
Reference in New Issue
Block a user