diff --git a/.gitignore b/.gitignore
index 99afbb4..21161ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,29 @@
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# AWS User-specific
+.idea/**/aws.xml
+
+# Generated files
+.idea/**/contentModel.xml
+.idea
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
*.pyc
*.flac
.vscode
diff --git a/homepage/index.php b/homepage/index.php
index 957a9fd..eeae423 100644
--- a/homepage/index.php
+++ b/homepage/index.php
@@ -37,7 +37,7 @@ body::-webkit-scrollbar {
display:none
}
-
+
diff --git a/homepage/style.css b/homepage/style.css
index fff058a..69c350a 100644
--- a/homepage/style.css
+++ b/homepage/style.css
@@ -828,6 +828,12 @@ pre#timer.bash {
background-color: #9fe29b;
}
+.exclude_species_list_option_highlight {
+ color: black;
+ background-color: rgb(119, 196, 135);
+ font-weight: bolder;
+}
+
#ddnewline::before {
content: none;
}
\ No newline at end of file
diff --git a/homepage/views.php b/homepage/views.php
index 6581111..5a97949 100644
--- a/homepage/views.php
+++ b/homepage/views.php
@@ -271,10 +271,10 @@ if(isset($_GET['view'])){
} else {
$submittedpwd = $_SERVER['PHP_AUTH_PW'];
$submitteduser = $_SERVER['PHP_AUTH_USER'];
- $allowedCommands = array('sudo systemctl stop livestream.service && sudo /etc/init.d/icecast2 stop',
- 'sudo systemctl restart livestream.service && sudo /etc/init.d/icecast2 restart',
- 'sudo systemctl disable --now livestream.service && sudo systemctl disable icecast2 && sudo /etc/init.d/icecast2 stop',
- 'sudo systemctl enable icecast2 && sudo /etc/init.d/icecast2 start && sudo systemctl enable --now livestream.service',
+ $allowedCommands = array('sudo systemctl stop livestream.service && sudo systemctl stop icecast2.service',
+ 'sudo systemctl restart livestream.service && sudo systemctl restart icecast2.service',
+ 'sudo systemctl disable --now livestream.service && sudo systemctl disable icecast2 && sudo systemctl stop icecast2.service',
+ 'sudo systemctl enable icecast2 && sudo systemctl start icecast2.service && sudo systemctl enable --now livestream.service',
'sudo systemctl stop web_terminal.service',
'sudo systemctl restart web_terminal.service',
'sudo systemctl disable --now web_terminal.service',
@@ -321,9 +321,28 @@ if(isset($_GET['view'])){
if($submittedpwd == $caddypwd && $submitteduser == 'birdnet' && in_array($command,$allowedCommands)){
if(isset($command)){
$initcommand = $command;
- if (strpos($command, "systemctl") !== false) {
- $tmp = explode(" ",trim($command));
- $command .= "& sleep 3;sudo systemctl status ".end($tmp);
+ if (strpos($command, "systemctl") !== false) {
+ //If there more than one command to execute, processes then separately
+ //currently only livestream service uses multiple commands to interact with the required services
+ if (strpos($command, " && ") !== false) {
+ $separate_commands = explode("&&", trim($command));
+ $new_multiservice_status_command = "";
+ foreach ($separate_commands as $indiv_service_command) {
+ //explode the string by " " space so we can get each individual component of the command
+ //and eventually the service name at the end
+ $separate_command_tmp = explode(" ", trim($indiv_service_command));
+ //get the service names
+ $new_multiservice_status_command .= " " . trim(end($separate_command_tmp));
+ }
+
+ $service_names = $new_multiservice_status_command;
+ } else {
+ //only one service needs restarting so we only need to query the status of one service
+ $tmp = explode(" ", trim($command));
+ $service_names = end($tmp);
+ }
+
+ $command .= " & sleep 3;sudo systemctl status " . $service_names;
}
if($initcommand == "update_birdnet.sh") {
unset($_SESSION['behind']);
diff --git a/scripts/birdnet_analysis.sh b/scripts/birdnet_analysis.sh
index 474a757..aadf6f8 100755
--- a/scripts/birdnet_analysis.sh
+++ b/scripts/birdnet_analysis.sh
@@ -189,7 +189,7 @@ TODAY="$RECS_DIR/$(date "+%B-%Y/%d-%A")"
if [ $(find ${YESTERDAY} -name '*wav' 2>/dev/null | wc -l) -gt 0 ];then
find $YESTERDAY -name '*wav' -type f -size 0 -delete
run_birdnet "${YESTERDAY}"
-elif [ $(find ${TODAY} -name '*wav' | wc -l) -gt 0 ];then
+elif [ $(find ${TODAY} -name '*wav' 2>/dev/null | wc -l) -gt 0 ];then
find $TODAY -name '*wav' -type f -size 0 -delete
run_birdnet "${TODAY}"
fi
diff --git a/scripts/birdnet_recording.sh b/scripts/birdnet_recording.sh
index dfdcefc..9f98379 100755
--- a/scripts/birdnet_recording.sh
+++ b/scripts/birdnet_recording.sh
@@ -1,8 +1,11 @@
#!/usr/bin/env bash
-# Performs the recording from the specified RSTP stream or soundcard
-set -x
+# Performs the recording from the specified RTSP stream or soundcard
+#set -x
source /etc/birdnet/birdnet.conf
+# Set the logging level
+LOGGING_LEVEL='error'
+
[ -z $RECORDING_LENGTH ] && RECORDING_LENGTH=15
if [ ! -z $RTSP_STREAM ];then
@@ -33,7 +36,7 @@ if [ ! -z $RTSP_STREAM ];then
# Make sure were passing something valid to ffmpeg, ffmpeg will run interactive and control our look by waiting ${RECORDING_LENGTH} between loops
if [ -n "$FFMPEG_PARAMS" ];then
- ffmpeg -nostdin $FFMPEG_PARAMS
+ ffmpeg -hide_banner -loglevel $LOGGING_LEVEL -nostdin $FFMPEG_PARAMS
fi
done
diff --git a/scripts/exclude_list.php b/scripts/exclude_list.php
index d3d496f..f719679 100644
--- a/scripts/exclude_list.php
+++ b/scripts/exclude_list.php
@@ -7,6 +7,8 @@