A live bird collage card for your Home Assistant dashboard.
fix: do not crash if disk_check_exclude.txt is not created yet
frederik6e6e9eab089f
diff --git a/scripts/play.php b/scripts/play.phpindex e310965a..a7dcc68a 100644--- a/scripts/play.php+++ b/scripts/play.php@@ -521,9 +521,11 @@ echo "<table>$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');+ $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")));+ } else {+ $disk_check_exclude_arr = [];}if($config["FULL_DISK"] == "purge") {