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

View File

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