bash_tv/playlist.sh

23 lines
371 B
Bash
Raw Normal View History

#!/bin/bash
set -e
source ./common.sh
fileList=$(mktemp)
shuffleList=$(mktemp)
ls -1 "${VIDEOS}/" > "${fileList}"
rm -rf playlist.txt
2024-05-12 22:33:03 +00:00
count=50
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}"
2024-05-12 22:33:03 +00:00
rm -f "${shuffleList}"