diff options
Diffstat (limited to 'roles/obs')
| -rw-r--r-- | roles/obs/tasks/main.yml | 17 | ||||
| -rw-r--r-- | roles/obs/templates/emacsconf-stream-config.el | 4 | ||||
| -rwxr-xr-x | roles/obs/templates/intro | 10 | ||||
| -rwxr-xr-x | roles/obs/templates/music | 2 | ||||
| -rwxr-xr-x | roles/obs/templates/play | 2 |
5 files changed, 21 insertions, 14 deletions
diff --git a/roles/obs/tasks/main.yml b/roles/obs/tasks/main.yml index 5df7d56..95f12b6 100644 --- a/roles/obs/tasks/main.yml +++ b/roles/obs/tasks/main.yml @@ -47,6 +47,16 @@ template: src: xorg.conf dest: /etc/X11/xorg.conf +- name: Create directories + file: + owner: "{{ emacsconf_user }}" + group: "{{ emacsconf_group }}" + path: "{{ item }}" + state: directory + mode: 0775 + loop: + - "{{ emacsconf_asset_dir }}" + - "{{ emacsconf_asset_dir }}/stream" - name: Set up MPV and MPVC tags: mpv include_tasks: mpv.yml @@ -105,13 +115,6 @@ nopassword: true with_items: - "{{ emacsconf_tracks }}" -- name: Create directories - file: - owner: "{{ emacsconf_user }}" - group: "{{ emacsconf_group }}" - path: "{{ emacsconf_asset_dir }}" - state: directory - mode: 0775 - name: Set up scripts tags: wip, obs-scripts template: diff --git a/roles/obs/templates/emacsconf-stream-config.el b/roles/obs/templates/emacsconf-stream-config.el index bd5ffd7..2aa886b 100644 --- a/roles/obs/templates/emacsconf-stream-config.el +++ b/roles/obs/templates/emacsconf-stream-config.el @@ -13,7 +13,9 @@ (setq emacsconf-stream-track "{{ item.name }}") (autoload 'text-property-search-forward "text-property-search") (add-to-list 'load-path "~/emacsconf-el") +(setq tab-width 2) +(setq case-fold-search t) +(setq emacsconf-cache-dir "{{ emacsconf_caption_dir }}/cache") (require 'emacsconf) (require 'emacsconf-stream) (emacsconf-stream-display-clock-and-countdown) -(setq tab-width 2) diff --git a/roles/obs/templates/intro b/roles/obs/templates/intro index bf02dc3..9bf1161 100755 --- a/roles/obs/templates/intro +++ b/roles/obs/templates/intro @@ -8,7 +8,7 @@ fi SLUG=$1 FILE=$1 if [[ ! -f $FILE ]]; then - LIST=({{ emacsconf_caption_dir }}/assets/stream/emacsconf-{{ emacsconf_year }}-$FILE--*.webm) + LIST=({{ emacsconf_caption_dir }}/cache/emacsconf-{{ emacsconf_year }}-$FILE--*--intro.webm) FILE="${LIST[0]}" BY_SLUG=1 else @@ -16,8 +16,10 @@ else fi shift overlay $SLUG -if [[ -f {{ emacsconf_caption_dir }}/assets/intros/$SLUG.webm ]]; then - mpv {{ emacsconf_caption_dir }}/assets/intros/$SLUG.webm +if [[ -f "$FILE" ]]; then + echo "Playing $FILE" + mpv "$FILE" else - firefox {{ emacsconf_caption_dir }}/assets/in-between/$SLUG.png + echo "Opening backup image {{ emacsconf_caption_dir }}/assets/in-between/$SLUG.png" + firefox {{ emacsconf_caption_dir }}/assets/in-between/$SLUG.png fi diff --git a/roles/obs/templates/music b/roles/obs/templates/music index 3e729ec..a5a6a31 100755 --- a/roles/obs/templates/music +++ b/roles/obs/templates/music @@ -1,5 +1,5 @@ if screen -list | grep -q background; then echo "Already running in screen, attach with screen -x background" else - screen -dmS background /bin/bash -c "mpv {{ background_music_dir }}/* --shuffle --loop=inf --volume={{ background_music_volume }}" + screen -dmS background /bin/bash -c "mpv {{ background_music_dir }}/* --shuffle --loop-playlist=inf --volume={{ background_music_volume }}" fi diff --git a/roles/obs/templates/play b/roles/obs/templates/play index e205b46..69632d4 100755 --- a/roles/obs/templates/play +++ b/roles/obs/templates/play @@ -24,7 +24,7 @@ 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) + LIST=($CACHE_DIR/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm) else LIST=($BASE_DIR/assets/test/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm) fi |
