diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-12-01 19:23:36 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-12-01 19:23:36 -0500 |
commit | 0a7edf0d333d5959d75c9934ce23f19bb399b6e2 (patch) | |
tree | 93209b36d2810577b291ce23a3493b546e532773 /emacsconf-publish.el | |
parent | 853bdd7683e96a02dfbde7dc32146ead29ca7591 (diff) | |
download | emacsconf-el-0a7edf0d333d5959d75c9934ce23f19bb399b6e2.tar.xz emacsconf-el-0a7edf0d333d5959d75c9934ce23f19bb399b6e2.zip |
intro checking
Diffstat (limited to 'emacsconf-publish.el')
-rw-r--r-- | emacsconf-publish.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el index 2701cf1..f37c654 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -1585,8 +1585,10 @@ This video is available under the terms of the Creative Commons Attribution-Shar (let ((main (expand-file-name (concat (plist-get talk :video-slug) "--main.webm") emacsconf-cache-dir))) (emacsconf-with-talk-heading talk - (let* ((video-file-name (emacsconf-get-preferred-video (org-entry-get (point) "VIDEO_SLUG"))) + (let* ((video-file-name (emacsconf-get-preferred-video (plist-get talk :video-slug))) (video-file (and video-file-name (expand-file-name video-file-name emacsconf-cache-dir))) + (intro-file (expand-file-name (concat (plist-get talk :slug) ".webm") + (expand-file-name "intros" emacsconf-stream-asset-dir))) duration) (unless (file-exists-p main) (setq main video-file-name)) @@ -1603,7 +1605,11 @@ This video is available under the terms of the Creative Commons Attribution-Shar (unless (plist-get talk :video-duration) (setq duration (/ (compile-media-get-file-duration-ms video-file) 1000)) (org-entry-put (point) "VIDEO_DURATION" (format-seconds "%m:%.2s" duration)) - (org-entry-put (point) "VIDEO_TIME" (number-to-string (ceiling (/ duration 60)))))))))) + (org-entry-put (point) "VIDEO_TIME" (number-to-string (ceiling (/ duration 60)))))) + (when (file-exists-p intro-file) + (org-entry-put + (point) "INTRO_TIME" + (number-to-string (ceiling (/ (compile-media-get-file-duration-ms intro-file) 60000))))))))) (defvar emacsconf-youtube-channel-id "UCwuyodzTl_KdEKNuJmeo99A") (defun emacsconf-youtube-edit () |