aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/kanalplay.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-05-12 13:04:54 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-05-12 13:04:54 +0800
commitc1c924abfeda45f29b991bb74f315f0e79dcf126 (patch)
treef29b6ae2baa7db6397a429c530a81c9ff744fd0f /youtube_dl/extractor/kanalplay.py
parent1c7e2e64f6328024711d5fa999d4498396f4cb5c (diff)
[utils,common] Merge format_srt_time and _subtitles_timecode
format_srt_time uses a comma as the delimiter between seconds and milliseconds while _subtitles_timecode uses a dot. All .srt examples I found on the Internet uses a comma, so I use a comma in the merged version. See http://matroska.org/technical/specs/subtitles/srt.html and http://devel.aegisub.org/wiki/SubtitleFormats/SRT
Diffstat (limited to 'youtube_dl/extractor/kanalplay.py')
-rw-r--r--youtube_dl/extractor/kanalplay.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/kanalplay.py b/youtube_dl/extractor/kanalplay.py
index 2bb078036..4597d1b96 100644
--- a/youtube_dl/extractor/kanalplay.py
+++ b/youtube_dl/extractor/kanalplay.py
@@ -7,6 +7,7 @@ from .common import InfoExtractor
from ..utils import (
ExtractorError,
float_or_none,
+ srt_subtitles_timecode,
)
@@ -39,8 +40,8 @@ class KanalPlayIE(InfoExtractor):
'%s\r\n%s --> %s\r\n%s'
% (
num,
- self._subtitles_timecode(item['startMillis'] / 1000.0),
- self._subtitles_timecode(item['endMillis'] / 1000.0),
+ srt_subtitles_timecode(item['startMillis'] / 1000.0),
+ srt_subtitles_timecode(item['endMillis'] / 1000.0),
item['text'],
) for num, item in enumerate(subs, 1))