From 501206a5b4619dc7a939455ae66d85d638e441fb Mon Sep 17 00:00:00 2001 From: Florian Schlegel Date: Sun, 23 Aug 2020 02:35:33 +0200 Subject: [PATCH] restrict find to regular files --- RandomVideo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RandomVideo.sh b/RandomVideo.sh index 7e6bd72..da79e09 100755 --- a/RandomVideo.sh +++ b/RandomVideo.sh @@ -29,6 +29,6 @@ if $(command -v pgrep) omxplayer > /dev/null; then else playerpath=$(command -v "$player") - $playerpath "$(find "$folder" -maxdepth 1 ! -name "$(basename $folder)"|sort -R |head -n1)" & + $playerpath "$(find "$folder" -maxdepth 1 -type f |sort -R |head -n1)" & fi