add IMAGE_PROVIDER config

This commit is contained in:
frederik
2025-08-17 09:59:12 +02:00
committed by Nachtzuster
parent ae72399c43
commit a5154c38ed
3 changed files with 25 additions and 2 deletions
+10
View File
@@ -113,6 +113,16 @@ if ! grep -E '^RARE_SPECIES_THRESHOLD=' /etc/birdnet/birdnet.conf &>/dev/null;th
echo "RARE_SPECIES_THRESHOLD=\"30\"" >> /etc/birdnet/birdnet.conf
fi
if ! grep -E '^IMAGE_PROVIDER=' /etc/birdnet/birdnet.conf &>/dev/null;then
if grep -E '^FLICKR_API_KEY=\S+' /etc/birdnet/birdnet.conf &>/dev/null;then
PROVIDER=FLICKR
else
PROVIDER=""
fi
echo '## WIKIPEDIA or FLICKR (Flickr requires API key)' >> /etc/birdnet/birdnet.conf
echo "IMAGE_PROVIDER=${PROVIDER}" >> /etc/birdnet/birdnet.conf
fi
[ -d $RECS_DIR/StreamData ] || sudo_with_user mkdir -p $RECS_DIR/StreamData
[ -L ${EXTRACTED}/spectrogram.png ] || sudo_with_user ln -sf ${RECS_DIR}/StreamData/spectrogram.png ${EXTRACTED}/spectrogram.png