summaryrefslogtreecommitdiff
path: root/bin/play
diff options
context:
space:
mode:
Diffstat (limited to 'bin/play')
-rwxr-xr-xbin/play12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/play b/bin/play
index 290e99a..6893d53 100755
--- a/bin/play
+++ b/bin/play
@@ -8,6 +8,7 @@
# echo "q quit 255" >> ~/.mpv/input.conf
printhelp(){
+
echo "Bash script to play and cache files from a slow network ressource"
echo ""
echo "-y move to archiv without question"
@@ -16,13 +17,10 @@ printhelp(){
echo "-r only remove the file in /tmp"
echo "-d don't ask for downloading"
echo "-h prints this help"
+
exit 0
}
-if [ $# -eq 0 ]; then
- printhelp
-fi
-
while true; do
case "$1" in
-y|-Y|-yes|-j|-ja) verify="yes"
@@ -34,7 +32,7 @@ while true; do
-o|-other|-ot) verify="other"
shift
;;
- -n|-no|-nope|-nein) verify=
+ -n|-no|-nope|-nein) verify="no"
shift
;;
-d|-download|-down) download="yes"
@@ -47,6 +45,10 @@ while true; do
esac
done
+if [ $# -eq 0 ]; then
+ printhelp
+fi
+
player[0]=$(command -v mpv) #media player of choice
player[1]=$(command -v mplayer)
player[2]=$(command -v vlc) #you shouldn't use vlc