diff options
author | Sacha Chua <sacha@sachachua.com> | 2024-11-08 19:02:59 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2024-11-08 19:02:59 -0500 |
commit | ba26b3fde79e4329056794cb5e8f9c1a1a76787d (patch) | |
tree | 8ea63f1cb2c6f5c4c3773e0944ece420d4b3a041 /emacsconf-publish.el | |
parent | 4478143e6c8e55ebbbd7e9ae6d0645774e302111 (diff) | |
download | emacsconf-el-ba26b3fde79e4329056794cb5e8f9c1a1a76787d.tar.xz emacsconf-el-ba26b3fde79e4329056794cb5e8f9c1a1a76787d.zip |
use --main.vtt or --reencoded.vtt backstage
Diffstat (limited to '')
-rw-r--r-- | emacsconf-publish.el | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el index b29266c..11924e8 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -369,9 +369,8 @@ (let ((tracks (emacsconf-video-subtitle-tracks (or (plist-get talk :caption-file) - (concat (replace-regexp-in-string "reencoded\\|original" "main" - video-base) - ".vtt")) + (emacsconf-talk-file talk "--main.vtt") + (emacsconf-talk-file talk "--reencoded.vtt")) (or (plist-get talk :track-base-url) (plist-get talk :base-url)) (plist-get talk :files)))) @@ -1752,22 +1751,24 @@ ${include} (defun emacsconf-video-subtitle-tracks (filename track-base-url &optional files) (setq files (or files (directory-files emacsconf-cache-dir))) - (concat - (if (member (file-name-nondirectory filename) files) - (format "<track label=\"English\" kind=\"captions\" srclang=\"en\" src=\"%s\" default />" - (concat (or track-base-url "") (file-name-nondirectory filename))) - "") - (mapconcat - (lambda (lang) - (let ((lang-file (concat (file-name-sans-extension filename) "_" (car lang) "." (file-name-extension filename)))) - (if (member lang-file files) - (format "<track label=\"%s\" kind=\"captions\" srclang=\"%s\" src=\"%s\" />" - (cdr lang) - (car lang) - (concat (or track-base-url "") (file-name-nondirectory lang-file))) - ""))) - emacsconf-publish-subtitle-languages - ""))) + (if filename + (concat + (if (member (file-name-nondirectory filename) files) + (format "<track label=\"English\" kind=\"captions\" srclang=\"en\" src=\"%s\" default />" + (concat (or track-base-url "") (file-name-nondirectory filename))) + "") + (mapconcat + (lambda (lang) + (let ((lang-file (concat (file-name-sans-extension filename) "_" (car lang) "." (file-name-extension filename)))) + (if (member lang-file files) + (format "<track label=\"%s\" kind=\"captions\" srclang=\"%s\" src=\"%s\" />" + (cdr lang) + (car lang) + (concat (or track-base-url "") (file-name-nondirectory lang-file))) + ""))) + emacsconf-publish-subtitle-languages + "")) + "")) (defun emacsconf-publish-link-file-formats (file-prefix) (string-join (emacsconf-publish-link-file-formats-as-list file-prefix) " ")) |