mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Correct code
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
## 0.5.5-3 (02-07-2024)
|
|
||||||
- New option : set the audio clip directory from addon options
|
- New option : set the audio clip directory from addon options
|
||||||
|
|
||||||
## 0.5.5-2 (25-06-2024)
|
## 0.5.5-2 (25-06-2024)
|
||||||
|
|||||||
@@ -110,5 +110,5 @@
|
|||||||
"slug": "birdnet-go",
|
"slug": "birdnet-go",
|
||||||
"udev": true,
|
"udev": true,
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-go",
|
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-go",
|
||||||
"version": "0.5.5-4"
|
"version": "0.5.5-5"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ bashio::log.info "Correct config for defaults"
|
|||||||
echo "... database location is /config/birdnet.db"
|
echo "... database location is /config/birdnet.db"
|
||||||
for configloc in /config/config.yaml /internal/conf/config.yaml; do
|
for configloc in /config/config.yaml /internal/conf/config.yaml; do
|
||||||
if [ -f "$configloc" ]; then
|
if [ -f "$configloc" ]; then
|
||||||
sed -i "/path: birdnet.db/c\ path: /config/birdnet.db # path to sqlite database" "$configloc"
|
sed -i "/path: birdnet.db/c\ path: /config/birdnet.db # path to sqlite database" "$configloc"
|
||||||
sed -i "/path to sqlite database/c\ path: /config/birdnet.db # path to sqlite database" "$configloc"
|
sed -i "/path to sqlite database/c\ path: /config/birdnet.db # path to sqlite database" "$configloc"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -39,10 +39,11 @@ done
|
|||||||
echo "... audio clips saved to $birdsongsloc"
|
echo "... audio clips saved to $birdsongsloc"
|
||||||
for configloc in /config/config.yaml /internal/conf/config.yaml; do
|
for configloc in /config/config.yaml /internal/conf/config.yaml; do
|
||||||
if [ -f "$configloc" ]; then
|
if [ -f "$configloc" ]; then
|
||||||
sed -i "/path: clips/c\ path: $birdsongsloc/ # path to audio clip export directory" "$configloc"
|
sed -i "/path: clips/c\ path: $birdsongsloc/ # path to audio clip export directory" "$configloc"
|
||||||
sed -i "/audio clip export directory/c\ path: $birdsongsloc/ # path to audio clip export directory" "$configloc"
|
sed -i "/audio clip export directory/c\ path: $birdsongsloc/ # path to audio clip export directory" "$configloc"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# If default capture is set at 0%, increase it to 50%
|
# If default capture is set at 0%, increase it to 50%
|
||||||
current_volume="$(amixer sget Capture | grep -oP '\[\d+%]' | tr -d '[]%' | head -1)" 2>/dev/null || true
|
current_volume="$(amixer sget Capture | grep -oP '\[\d+%]' | tr -d '[]%' | head -1)" 2>/dev/null || true
|
||||||
current_volume="${current_volume:-100}"
|
current_volume="${current_volume:-100}"
|
||||||
|
|||||||
Reference in New Issue
Block a user