summaryrefslogtreecommitdiffstats
path: root/emacsconf-stream.el
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-11-02 09:08:51 -0400
committerSacha Chua <sacha@sachachua.com>2022-11-02 09:08:51 -0400
commite10ab93db435c18f024c2c30d4939aee18f469c6 (patch)
tree823239438841651e7cb684f5d4cd59b71e72e637 /emacsconf-stream.el
parenta737e350040516537ea797af3127b32c73c31365 (diff)
downloademacsconf-el-e10ab93db435c18f024c2c30d4939aee18f469c6.tar.xz
emacsconf-el-e10ab93db435c18f024c2c30d4939aee18f469c6.zip
Add tramp info so that the stream can use sudo
Diffstat (limited to 'emacsconf-stream.el')
-rw-r--r--emacsconf-stream.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/emacsconf-stream.el b/emacsconf-stream.el
index 3ae5fe1..20704cb 100644
--- a/emacsconf-stream.el
+++ b/emacsconf-stream.el
@@ -33,14 +33,15 @@ Files should be in YEAR/video-slug--main.webm and video-slug--main.vtt.")
"Return user@host for the track."
(when (plist-get track :track)
(setq track (emacsconf-get-track (plist-get track :track))))
- (concat emacsconf-id "-" (plist-get track :id) "@" emacsconf-stream-host))
+ (or (plist-get track :tramp)
+ (concat "/ssh:" emacsconf-id "-" (plist-get track :id) "@" emacsconf-stream-host)))
(defvar emacsconf-stream-bottom-limit 80
"Number of characters for bottom text.")
(defun emacsconf-stream-write-news (track message)
(interactive (list (emacsconf-complete-track) (read-string "Message: ")))
- (with-temp-file (expand-file-name "news.txt" (concat "/ssh:" (emacsconf-stream-track-login track) ":~"))
+ (with-temp-file (expand-file-name "news.txt" (concat (emacsconf-stream-track-login track) "~"))
(insert message)))
(defun emacsconf-stream-broadcast (message)
@@ -62,7 +63,7 @@ Files should be in YEAR/video-slug--main.webm and video-slug--main.vtt.")
(defun emacsconf-stream-set-talk-info-from-strings (track url bottom)
(interactive (list (emacsconf-complete-track) (read-string "URL: ") (read-string "Bottom: ")))
- (let* ((home (concat "/ssh:" (emacsconf-stream-track-login track) ":~")))
+ (let* ((home (concat (emacsconf-stream-track-login track) "~")))
(with-temp-file (expand-file-name "url.txt" home) (insert url))
(with-temp-file (expand-file-name "bottom.txt" home) (insert bottom))))
@@ -110,9 +111,10 @@ Final files should be stored in /data/emacsconf/stream/YEAR/video-slug--main.web
(defun emacsconf-stream-play-video (talk)
(interactive (list (emacsconf-complete-talk-info)))
- (start-process (concat "mpv-" (plist-get talk :slug))
- "test"
- "ssh" (emacsconf-stream-track-login talk) "nohup" "~/bin/track-mpv" (emacsconf-stream-get-filename talk) "&"))
+ (let ((default-directory (emacsconf-stream-track-login talk)))
+ (start-process (concat "mpv-" (plist-get talk :slug))
+ "test"
+ "~/bin/track-mpv" (emacsconf-stream-get-filename talk))))
(provide 'emacsconf-stream)
;;; emacsconf-stream.el ends here