Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/guysoft/OctoPi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Hakkarainen <bionik@gmail.com>2018-02-27 11:30:57 +0300
committerLauri Hakkarainen <bionik@gmail.com>2018-02-27 11:30:57 +0300
commita55b3a1c7a521490a48f605ec1e7ed8a17c6ed72 (patch)
treeb1f286e6955b5016a8a06939500a7aed95156b90
parent5cf9c68a1906c7c83293164d748b3281513e20bf (diff)
Will now echo found devices only if trying to use an USB cam and if devices are found
-rwxr-xr-xsrc/modules/octopi/filesystem/home/root/bin/webcamd4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/octopi/filesystem/home/root/bin/webcamd b/src/modules/octopi/filesystem/home/root/bin/webcamd
index 3a7021b..08fd003 100755
--- a/src/modules/octopi/filesystem/home/root/bin/webcamd
+++ b/src/modules/octopi/filesystem/home/root/bin/webcamd
@@ -147,10 +147,12 @@ while true; do
# get list of usb video devices into an array
video_devices=($(find /dev -regextype sed -regex '\/dev/video[0-9]\+' | sort 2> /dev/null))
- echo "Found video devices:" && printf '%s\n' "${video_devices[@]}"
if [ ${#video_devices[@]} != 0 ] && { [ "$camera" = "auto" ] || [ "$camera" = "usb" ] ; }; then
+ echo "Found video devices:"
+ printf '%s\n' "${video_devices[@]}"
+
if [[ $usb_device_path ]]; then
# usb device is explicitly set in options
if containsString "$usb_device_path" "${video_devices[@]}"; then