diff --git a/scripts/config.php b/scripts/config.php index d95a9fc..a4631c0 100644 --- a/scripts/config.php +++ b/scripts/config.php @@ -187,6 +187,11 @@ if(isset($_GET['sendtest']) && $_GET['sendtest'] == "true") { $filename = "http://birdnetpi.local/"."?filename=".$filename; } + $attach=""; + if (strpos($body, '$flickrimage') !== false) { + $attach = "--attach https://live.staticflickr.com/7430/27545810581_8bfa8289a3_c.jpg"; + } + $title = str_replace("\$sciname", $sciname, $title); $title = str_replace("\$comname", $comname, $title); $title = str_replace("\$confidence", $confidence, $title); @@ -199,6 +204,7 @@ if(isset($_GET['sendtest']) && $_GET['sendtest'] == "true") { $title = str_replace("\$cutoff", $cutoff, $title); $title = str_replace("\$sens", $sens, $title); $title = str_replace("\$overlap", $overlap, $title); + $title = str_replace("\$flickrimage", "", $title); $body = str_replace("\$sciname", $sciname, $body); $body = str_replace("\$comname", $comname, $body); @@ -212,8 +218,9 @@ if(isset($_GET['sendtest']) && $_GET['sendtest'] == "true") { $body = str_replace("\$cutoff", $cutoff, $body); $body = str_replace("\$sens", $sens, $body); $body = str_replace("\$overlap", $overlap, $body); + $body = str_replace("\$flickrimage", "", $body); - echo "
".shell_exec($home."/BirdNET-Pi/birdnet/bin/apprise -vv -t '".$title."' -b '".$body."' ".$cf." ")."
"; + echo "
".shell_exec($home."/BirdNET-Pi/birdnet/bin/apprise -vv -t '".$title."' -b '".$body."' ".$attach." ".$cf." ")."
"; die(); }