diff options
Diffstat (limited to 'roles/obs/templates/intro')
-rwxr-xr-x | roles/obs/templates/intro | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/roles/obs/templates/intro b/roles/obs/templates/intro index 85ee895..7b5d4ab 100755 --- a/roles/obs/templates/intro +++ b/roles/obs/templates/intro @@ -5,17 +5,19 @@ if screen -list | grep -q background; then screen -S background -X quit fi # Update the overlay +SLUG=$1 FILE=$1 if [[ ! -f $FILE ]]; then - LIST=(/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm) + LIST=(/data/emacsconf/assets/stream/emacsconf-{{ emacsconf_year }}-$FILE--*.webm) FILE="${LIST[0]}" BY_SLUG=1 +else + SLUG=$(echo "$FILE" | perl -ne 'if (/emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }') fi shift -SLUG=$(echo "$FILE" | perl -ne 'if (/emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }') overlay $SLUG if [[ -f /data/emacsconf/assets/intros/$SLUG.webm ]]; then mpv /data/emacsconf/assets/intros/$SLUG.webm else firefox /data/emacsconf/assets/in-between/$SLUG.png -fi
\ No newline at end of file +fi |