Merge pull request #27 from dnorhoj/patch-1

Cloud plugin selection fix and check resolution formatting
This commit is contained in:
paukstelis
2022-07-15 14:15:58 -04:00
committed by GitHub
2 changed files with 14 additions and 6 deletions

View File

@@ -419,13 +419,20 @@ add_camera() {
fi fi
echo "Settings can be modified after initial setup in /etc/systemd/system/cam_$INSTANCE" echo "Settings can be modified after initial setup in /etc/systemd/system/cam_$INSTANCE"
echo echo
echo "Camera Resolution (no sanity check, so get it right) [default: 640x480]:" while true; do
read RESOLUTION echo "Camera Resolution [default: 640x480]:"
if [ -z "$RESOLUTION" ]; then read RESOLUTION
RESOLUTION="640x480" if [ -z $RESOLUTION]
fi then
RESOLUTION="640x480"
break
elif [[ $RESOLUTION =~ ^[0-9]+x[0-9]+$ ]]
then
break
fi
echo "Invalid resolution"
done
echo "Selected camera resolution: $RESOLUTION" | log echo "Selected camera resolution: $RESOLUTION" | log
#TODO check formating
echo "Camera Framerate (use 0 for ustreamer hardware) [default: 5]:" echo "Camera Framerate (use 0 for ustreamer hardware) [default: 5]:"
read FRAMERATE read FRAMERATE
if [ -z "$FRAMERATE" ]; then if [ -z "$FRAMERATE" ]; then

View File

@@ -52,5 +52,6 @@ plugin_menu_cloud() {
fi fi
plugin_path=$(cat $SCRIPTDIR/plugins_cloud | sed -n -e "s/^plugin:$plugin path:\([[:graph:]]*\)/\1/p") plugin_path=$(cat $SCRIPTDIR/plugins_cloud | sed -n -e "s/^plugin:$plugin path:\([[:graph:]]*\)/\1/p")
install_plugin install_plugin
break
done done
} }