projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb7e688
)
[extractor/common] Add subtitles timecode formatter
author
Sergey M․
<dstftw@gmail.com>
Fri, 13 Mar 2015 15:38:28 +0000
(21:38 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 13 Mar 2015 15:38:28 +0000
(21:38 +0600)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index f9e8e2bad156ec2880ee41c3fee2208e79def9ae..e5245ec3f29eb914b4a311bdf5f3c735e32d2f61 100644
(file)
--- a/
youtube_dl/extractor/common.py
+++ b/
youtube_dl/extractor/common.py
@@
-1062,6
+1062,9
@@
class InfoExtractor(object):
def _get_automatic_captions(self, *args, **kwargs):
raise NotImplementedError("This method must be implemented by subclasses")
+ def _subtitles_timecode(self, seconds):
+ return '%02d:%02d:%02d.%03d' % (seconds / 3600, (seconds % 3600) / 60, seconds % 60, (seconds % 1) * 1000)
+
class SearchInfoExtractor(InfoExtractor):
"""