summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2024-12-01 19:12:05 -0500
committerSacha Chua <sacha@sachachua.com>2024-12-01 19:12:05 -0500
commit0a81562e745b218fba542a32d962cb5415f6686a (patch)
tree63d2f7051b7b12b641ebc32d181bfe776483811f
parent0db62fffd9fa0c10cad508db70aeaa19bbf8217e (diff)
downloademacsconf-ansible-0a81562e745b218fba542a32d962cb5415f6686a.tar.xz
emacsconf-ansible-0a81562e745b218fba542a32d962cb5415f6686a.zip
check for PREFER_LIVE
-rwxr-xr-xroles/obs/templates/play9
1 files changed, 8 insertions, 1 deletions
diff --git a/roles/obs/templates/play b/roles/obs/templates/play
index 22f58c7..e205b46 100755
--- a/roles/obs/templates/play
+++ b/roles/obs/templates/play
@@ -11,18 +11,25 @@ CACHE_DIR="{{ emacsconf_caption_dir }}/cache"
FIREFOX_NAME=firefox-esr
SLUG=$1
PREFIX=$(get-file-prefix $SLUG)
-
+PREFER_LIVE=$(jq -r ".talks[] | select(.slug == \"$SLUG\") | .\"prefer-live\" " < "$BASE_DIR/talks.json")
/usr/local/bin/reset-state
# Update the overlay
overlay $SLUG
+if [ "$PREFER_LIVE" = "t" ]; then
+ /usr/local/bin/bbb $SLUG
+ exit 0
+fi
+
# Play the video if it exists. If it doesn't exist, switch to the BBB room and stop processing.
if [ "x$TEST_MODE" = "x" ]; then
LIST=($BASE_DIR/assets/stream/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm)
else
LIST=($BASE_DIR/assets/test/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm)
fi
+
+
FILE="${LIST[0]}"
# No file in the stream directory; check for original files in the stream directory, then check the cache
NOSUB=""