Work on deploying on pi

This commit is contained in:
Matt McWilliams 2024-05-12 18:33:03 -04:00
parent 1b8f2a8466
commit 4d83d9051f
2 changed files with 21 additions and 2 deletions

19
omxplayer_playlist.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
set -e
VIDEOS="./VIDEOS"
PLAYER="omxplayer -o hdmi --threshold 0"
fileList="./fileList.txt"
shuffleList=$(mktemp)
ls -1 "${VIDEOS}/" > "${fileList}"
while [ 1 -eq 1 ]; do
cat "${fileList}" | shuf > "${shuffleList}"
while read videoIn; do
echo "Playing ${videoIn}..."
${PLAYER} "${VIDEOS}/${videoIn}"
done < "${shuffleList}"
done

View File

@ -10,7 +10,7 @@ shuffleList=$(mktemp)
ls -1 "${VIDEOS}/" > "${fileList}"
rm -rf playlist.txt
count=10
count=50
for i in $(seq $count); do
cat "${fileList}" | shuf > "${shuffleList}"
while read videoIn; do
@ -19,4 +19,4 @@ for i in $(seq $count); do
done
rm -f "${fileList}"
rm -f "${shuffleList}"
rm -f "${shuffleList}"