From 07d8698dde10d57e58c464f0472b244ec78b8254 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sat, 26 Nov 2022 18:55:10 -0500 Subject: remove extra /emacsconf/ from mounts --- roles/obs/templates/mpv-track | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'roles/obs/templates/mpv-track') diff --git a/roles/obs/templates/mpv-track b/roles/obs/templates/mpv-track index 77d73bd..db3ea62 100755 --- a/roles/obs/templates/mpv-track +++ b/roles/obs/templates/mpv-track @@ -10,7 +10,9 @@ fi # Update the overlay FILE=$1 if [[ ! -f $FILE ]]; then - FILE="/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm" + LIST=(/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm) + FILE="${LIST[0]}" + BY_SLUG=1 fi shift SLUG=$(echo "$FILE" | perl -ne 'if (/^emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }') @@ -28,5 +30,12 @@ else echo "Could not find /data/emacsconf/assets/overlays/$SLUG-video.png, override ~/video.png manually" cp /data/emacsconf/assets/overlays/blank-video.png ~/video.png fi +if [[ "x$BY_SLUG" == "x1" ]] && [[ -f /data/emacsconf/assets/intros/$SLUG.webm ]]; then + INTRO=/data/emacsconf/assets/intros/$SLUG.webm + echo "Found intro $INTRO" +else + echo "Could not find /data/emacsconf/assets/intros/$SLUG.webm" +fi + # Play the video DISPLAY="${DISPLAY:-:{{ item.vnc_id }}}" mpv --input-ipc-server={{ emacsconf_home }}/mpv-socket-{{ emacsconf_id }}-{{ item.id }} --audio-device=pulse/{{ item.id }}-vid --profile={{ emacsconf_id }}-talks $FILE $* & -- cgit v1.2.3