From 7ecd95aa9164ad47252c6fa134692f3d9e3e8d49 Mon Sep 17 00:00:00 2001 From: Niklas Date: Tue, 2 Oct 2018 19:11:12 +0200 Subject: [PATCH] Don't add preceding newline when converting TTML to SRT --- youtube_dl/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index c9586e9b1..cec206742 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -2850,6 +2850,9 @@ def dfxp2srt(dfxp_data): index_offset += 1 out.append('%s\n' % (parse_node(para))) else: + if out: + out.append('\n') + out.append('%d\n%s --> %s\n%s\n' % ( index - index_offset, srt_subtitles_timecode(begin_time), srt_subtitles_timecode(end_time),