diff --git a/data/y-web/Y_Tools_Check_Install.yhtm b/data/y-web/Y_Tools_Check_Install.yhtm index b99f2749a..b1794292a 100644 --- a/data/y-web/Y_Tools_Check_Install.yhtm +++ b/data/y-web/Y_Tools_Check_Install.yhtm @@ -77,6 +77,12 @@ function do_check(){ =} /*programs*/ + {=var-set:grab={=find-exec:grab=}=} + {=if-empty:{=var-get:grab=}~ + sLog_addRow(sLog_body, "red", "Programs: grab is not installed. OSD Screenshot is disabled. ", "failed"); + ~ + sLog_addRow(sLog_body, "green", "Programs: grab is installed at: {=var-get:grab=}. OSD Screenshot is enabled.", "ok"); + =} {=var-set:fbshot={=find-exec:fbshot=}=} {=if-empty:{=var-get:fbshot=}~ sLog_addRow(sLog_body, "red", "Programs: fbshot is not installed. OSD Screenshot is disabled. ", "failed"); diff --git a/data/y-web/Y_Tools_Screenshot.yhtm b/data/y-web/Y_Tools_Screenshot.yhtm index 689551751..a28cbe6ca 100644 --- a/data/y-web/Y_Tools_Screenshot.yhtm +++ b/data/y-web/Y_Tools_Screenshot.yhtm @@ -1,3 +1,4 @@ +{=var-set:grab={=find-exec:grab=}=} {=var-set:fbshot={=find-exec:fbshot=}=} {=include-block:Y_NI_Blocks.txt;head=} @@ -43,8 +44,10 @@ function do_snapshot() { filename = id("filename").value; } - if ("{=var-get:fbshot=}" != "" && enableVideo == 0) - dbox_exec_tools("fbshot fb /tmp/"+filename+".png"); + if ("{=var-get:grab=}" != "" && enableVideo == 0) + dbox_exec_tools("fbshot grab -p -o /tmp/"+filename+".png"); + else if ("{=var-get:fbshot=}" != "" && enableVideo == 0) + dbox_exec_tools("fbshot fbshot /tmp/"+filename+".png"); else loadSyncURL("/control/screenshot?name="+filename+"&osd="+enableOSD+"&video="+enableVideo); diff --git a/data/y-web/scripts/Y_Tools.sh b/data/y-web/scripts/Y_Tools.sh index c362d159f..b292c1a81 100755 --- a/data/y-web/scripts/Y_Tools.sh +++ b/data/y-web/scripts/Y_Tools.sh @@ -479,17 +479,24 @@ do_lcshot() } # ----------------------------------------------------------- # osd shot -# $1= fb | dbox bzw. leer +# $1= fbshot | grab | dbox bzw. leer # ----------------------------------------------------------- do_fbshot() { - if [ "$1" = "fb" ]; then + if [ "$1" = "fbshot" ]; then shift 1 if [ -e "$y_path_varbin/fbshot" ]; then $y_path_varbin/fbshot $* else fbshot $* fi + elif [ "$1" = "grab" ]; then + shift 1 + if [ -e "$y_path_varbin/grab" ]; then + $y_path_varbin/grab $* + else + grab $* + fi else shift 1 if [ -e "$y_path_varbin/dboxshot" ]; then