From a8fb4c79a6574bd0272fff1f0b59ce2b2777330e Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Sun, 24 Apr 2022 11:30:19 -0400 Subject: [PATCH] fixing how birdnet_analysis.service handles corrupt audio files --- scripts/birdnet_analysis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/birdnet_analysis.sh b/scripts/birdnet_analysis.sh index 141ad82..3edfe2d 100755 --- a/scripts/birdnet_analysis.sh +++ b/scripts/birdnet_analysis.sh @@ -48,7 +48,7 @@ fi # Takes one argument: # - {DIRECTORY} get_files() { - files=($( find ${1} -maxdepth 1 -name '*wav' \ + files=($( find ${1} -maxdepth 1 -name '*wav' ! -size 0\ | sort \ | awk -F "/" '{print $NF}' )) [ -n "${files[1]}" ] && echo "Files loaded"