Scripts for building a random playlist and streaming to server.
This commit is contained in:
parent
3484fb6c8f
commit
1b8f2a8466
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
source ./common.sh
|
||||
|
||||
fileList=$(mktemp)
|
||||
shuffleList=$(mktemp)
|
||||
|
||||
ls -1 "${VIDEOS}/" > "${fileList}"
|
||||
rm -rf playlist.txt
|
||||
|
||||
count=10
|
||||
for i in $(seq $count); do
|
||||
cat "${fileList}" | shuf > "${shuffleList}"
|
||||
while read videoIn; do
|
||||
echo "file '${VIDEOS}/${videoIn}'" >> playlist.txt
|
||||
done < "${shuffleList}"
|
||||
done
|
||||
|
||||
rm -f "${fileList}"
|
||||
rm -f "${shuffleList}"
|
Loading…
Reference in New Issue