diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-11-04 19:00:50 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-11-04 19:00:50 -0400 |
commit | 67d7aac3235f3fba73b82e1f7d2660fbb59e44dd (patch) | |
tree | 8f13361fb72e87d45c88d77fad397070152cdf21 /emacsconf-subed.el | |
parent | dfbbf5d6078020b511f9c0104d2f056fa5769f38 (diff) | |
download | emacsconf-el-67d7aac3235f3fba73b82e1f7d2660fbb59e44dd.tar.xz emacsconf-el-67d7aac3235f3fba73b82e1f7d2660fbb59e44dd.zip |
Convenience functions for working with subtitles
Diffstat (limited to 'emacsconf-subed.el')
-rw-r--r-- | emacsconf-subed.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/emacsconf-subed.el b/emacsconf-subed.el index 93542ac..9aca0e0 100644 --- a/emacsconf-subed.el +++ b/emacsconf-subed.el @@ -149,15 +149,15 @@ "Open the caption file for this talk. Create it if necessary." (interactive) - (require 'compile-media) (let ((video-slug (org-entry-get (point) "VIDEO_SLUG"))) (find-file - (or (car (directory-files emacsconf-captions-directory + (or (car (directory-files emacsconf-cache-dir t (concat (regexp-quote video-slug) "--main\\.\\(srt\\|vtt\\)"))) (expand-file-name (concat video-slug "--main.vtt") "captions"))) (when (eobp) + (require 'compile-media) (insert "WEBVTT\n\n0:00:00.000 --> " (compile-media-msecs-to-timestamp (compile-media-get-file-duration-ms (subed-guess-video-file))) |