From 67d7aac3235f3fba73b82e1f7d2660fbb59e44dd Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Fri, 4 Nov 2022 19:00:50 -0400 Subject: Convenience functions for working with subtitles --- emacsconf-subed.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'emacsconf-subed.el') 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))) -- cgit v1.2.3