Skip to content

A live bird collage card for your Home Assistant dashboard.

fix: do not error out when disk_check_exclude.txt does not exist yet

frederik6da33df8e98f
diff --git a/scripts/play.php b/scripts/play.php
index 524bed52..062e3269 100644
--- a/scripts/play.php
+++ b/scripts/play.php
@@ -465,6 +465,8 @@ if(isset($_GET['species'])){ ?>
$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 = [];
}
$name = $_GET['species'];