Skip to content

A live bird collage card for your Home Assistant dashboard.

install flickr_labels

frederikfa1c15ceb80b
diff --git a/scripts/install_birdnet.sh b/scripts/install_birdnet.sh
index a06ab575..161ea56d 100755
--- a/scripts/install_birdnet.sh
+++ b/scripts/install_birdnet.sh
@@ -44,6 +44,6 @@ cd $my_dir/scripts || exit 1
CURRENT_TIMEZONE=$(timedatectl show --value --property=Timezone)
[ -f /etc/timezone ] && echo "$CURRENT_TIMEZONE" | sudo tee /etc/timezone > /dev/null
-./install_language_label_nm.sh -l $DATABASE_LANG || exit 1
+./install_language_label.sh || exit 1
exit 0
diff --git a/scripts/install_language_label.sh b/scripts/install_language_label.sh
index 87710b01..2c606124 100755
--- a/scripts/install_language_label.sh
+++ b/scripts/install_language_label.sh
@@ -2,9 +2,9 @@
source /etc/birdnet/birdnet.conf
if [ "$MODEL" == "BirdNET_GLOBAL_6K_V2.4_Model_FP16" ]; then
- BASEDIR=/home/$BIRDNET_USER/BirdNET-Pi/model/labels_nm
+ BASEDIR=labels_nm
else
- BASEDIR=/home/$BIRDNET_USER/BirdNET-Pi/model/labels_l18n
+ BASEDIR=labels_l18n
fi
label_file_name="labels_${DATABASE_LANG}.txt"
diff --git a/scripts/install_services.sh b/scripts/install_services.sh
index 9ba3a967..93a3366c 100755
--- a/scripts/install_services.sh
+++ b/scripts/install_services.sh
@@ -82,6 +82,7 @@ create_necessary_dirs() {
sudo -u ${USER} ln -fs $my_dir/templates/phpsysinfo.ini ${HOME}/phpsysinfo/
sudo -u ${USER} ln -fs $my_dir/templates/green_bootstrap.css ${HOME}/phpsysinfo/templates/
sudo -u ${USER} ln -fs $my_dir/templates/index_bootstrap.html ${HOME}/phpsysinfo/templates/html
+ sudo -u ${USER} ln -sf $my_dir/model/labels_nm/labels_en.txt $my_dir/model/labels_flickr.txt
chmod -R g+rw $my_dir
chmod -R g+rw ${RECS_DIR}
}
diff --git a/scripts/update_birdnet_snippets.sh b/scripts/update_birdnet_snippets.sh
index a55d540f..26ea366d 100755
--- a/scripts/update_birdnet_snippets.sh
+++ b/scripts/update_birdnet_snippets.sh
@@ -208,6 +208,13 @@ AUTH=$(grep basicauth /etc/caddy/Caddyfile)
[ -n "${CADDY_PWD}" ] && [ -z "${AUTH}" ] && sudo /usr/local/bin/update_caddyfile.sh > /dev/null 2>&1
set -x
+if ! [ -L $HOME/BirdNET-Pi/model/labels_flickr.txt ]; then
+ sudo_with_user ln -sf labels_nm/labels_en.txt $HOME/BirdNET-Pi/model/labels_flickr.txt
+fi
+if ! [ -L $HOME/BirdNET-Pi/model/labels.txt ]; then
+ sudo_with_user install_language_label.sh
+fi
+
# update snippets above
systemctl daemon-reload