From 5178a9876695cd73f8eea99884bde1e7a462e463 Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Tue, 17 May 2022 18:54:48 -0400 Subject: [PATCH] Efficiency, the sequel! --- scripts/play.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/play.php b/scripts/play.php index 1e73cbf..c32c7d7 100644 --- a/scripts/play.php +++ b/scripts/play.php @@ -319,6 +319,12 @@ if(isset($_GET['filename'])){ $confidence = $results['Confidence']; $filename_formatted = $date."/".$comname."/".$results['File_Name']; + // add disk_check_exclude.txt lines into an array for grepping + $fp = @fopen($home."/BirdNET-Pi/scripts/disk_check_exclude.txt", 'r'); + if ($fp) { + $disk_check_exclude_arr = explode("\n", fread($fp, filesize($home."/BirdNET-Pi/scripts/disk_check_exclude.txt"))); + } + if($config["FULL_DISK"] == "purge") { if(!in_array($filename_formatted, $disk_check_exclude_arr)) { $imageicon = "images/unlock.svg";