blob: 8f90a522c30ccce5f2696eb5f8433c2f272a8473 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
#Description: Shuffles and plays videos from your CONTENTDIR and, upon finishing watching them, removes them. You can pass a number of videos to this program and it'll queue that many videos up for you.
#Axioms: CONTENTDIR
#Dependencies: https://packages.debian.org/sid/mpv
numofvids=1
playablevideo="$(find ~/Videos/Content/ -maxdepth 1 -type f | shuf | head -1)"
if [ $# -eq 0 ]
then
mpv --ontop --geometry=100%:0% --autofit=20%x20% "$playablevideo"
rm "$playablevideo"
exit
fi
while [ $numofvids -le $1 ]
do
mpv --ontop --geometry=100%:0% --autofit=20%x20% "$playablevideo"
rm "$playablevideo"
playablevideo="$(find ~/Videos/Content/ -maxdepth 1 -type f | shuf | head -1)"
numofvids=$(($numofvids+1))
done
|