From 2171c690123ca09e846df7b4f2c3b872dd00535c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 14 Oct 2017 12:41:20 +0200 Subject: [PATCH] yWeb: fix grab-handling Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c670746226b7c1520061ecb84acaf2bb931f43ad Author: vanhofen Date: 2017-10-14 (Sat, 14 Oct 2017) Origin message was: ------------------ - yWeb: fix grab-handling Signed-off-by: Thilo Graf --- data/y-web/Y_Tools_Screenshot.yhtm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/data/y-web/Y_Tools_Screenshot.yhtm b/data/y-web/Y_Tools_Screenshot.yhtm index 242cee84c..f1e69142c 100644 --- a/data/y-web/Y_Tools_Screenshot.yhtm +++ b/data/y-web/Y_Tools_Screenshot.yhtm @@ -44,8 +44,15 @@ function do_snapshot() { filename = id("filename").value; } - if ("{=var-get:grab=}" != "" && enableVideo == 0) - dbox_exec_tools("fbshot grab -p -o /tmp/"+filename+".png"); + if ("{=var-get:grab=}" != "") + { + if (enableOSD == 1 && enableVideo == 1) + dbox_exec_tools("fbshot grab -p /tmp/"+filename+".png"); + else if (enableOSD == 1) + dbox_exec_tools("fbshot grab -p -o /tmp/"+filename+".png"); + else if (enableVideo == 1) + dbox_exec_tools("fbshot grab -p -v /tmp/"+filename+".png"); + } else if ("{=var-get:fbshot=}" != "" && enableVideo == 0) dbox_exec_tools("fbshot fbshot /tmp/"+filename+".png"); else