From fc82f1202f5c818f855a4cdb22a7bb2ec3a1f95e Mon Sep 17 00:00:00 2001 From: Charlie Powell <31997505+cp2004@users.noreply.github.com> Date: Sun, 14 Aug 2022 17:43:49 +0100 Subject: Fix vcgencmd get_camera output matching with libcamera --- src/modules/octopi/filesystem/home/root/bin/webcamd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/octopi/filesystem/home/root/bin/webcamd b/src/modules/octopi/filesystem/home/root/bin/webcamd index f2c6dfb..89d5d96 100755 --- a/src/modules/octopi/filesystem/home/root/bin/webcamd +++ b/src/modules/octopi/filesystem/home/root/bin/webcamd @@ -227,7 +227,9 @@ while true; do video_devices=($(find /dev -regextype sed -regex '\/dev/video[0-9]\+' | sort 2> /dev/null)) # add list of raspi camera into an array - if [ "`vcgencmd get_camera`" = "supported=1 detected=1" ]; then + vcgencmd_regex="supported=1 detected=1.*" + # Example output matching: supported=1 detected=1, libcamera interfaces=0 + if [[ "`vcgencmd get_camera`" =~ $vcgencmd_regex ]]; then video_devices+=( "raspi" ) fi -- cgit v1.2.3