mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
yWeb: enable grab to do screenshots
Origin commit data
------------------
Branch: ni/coolstream
Commit: 641346d84b
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Origin message was:
------------------
- yWeb: enable grab to do screenshots
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -77,6 +77,12 @@ function do_check(){
|
|||||||
=}
|
=}
|
||||||
|
|
||||||
/*programs*/
|
/*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=}=}
|
{=var-set:fbshot={=find-exec:fbshot=}=}
|
||||||
{=if-empty:{=var-get:fbshot=}~
|
{=if-empty:{=var-get:fbshot=}~
|
||||||
sLog_addRow(sLog_body, "red", "Programs: fbshot is not installed. OSD Screenshot is disabled. ", "failed");
|
sLog_addRow(sLog_body, "red", "Programs: fbshot is not installed. OSD Screenshot is disabled. ", "failed");
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
{=var-set:grab={=find-exec:grab=}=}
|
||||||
{=var-set:fbshot={=find-exec:fbshot=}=}
|
{=var-set:fbshot={=find-exec:fbshot=}=}
|
||||||
|
|
||||||
{=include-block:Y_NI_Blocks.txt;head=}
|
{=include-block:Y_NI_Blocks.txt;head=}
|
||||||
@@ -43,8 +44,10 @@ function do_snapshot() {
|
|||||||
filename = id("filename").value;
|
filename = id("filename").value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("{=var-get:fbshot=}" != "" && enableVideo == 0)
|
if ("{=var-get:grab=}" != "" && enableVideo == 0)
|
||||||
dbox_exec_tools("fbshot fb /tmp/"+filename+".png");
|
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
|
else
|
||||||
loadSyncURL("/control/screenshot?name="+filename+"&osd="+enableOSD+"&video="+enableVideo);
|
loadSyncURL("/control/screenshot?name="+filename+"&osd="+enableOSD+"&video="+enableVideo);
|
||||||
|
|
||||||
|
@@ -479,17 +479,24 @@ do_lcshot()
|
|||||||
}
|
}
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# osd shot
|
# osd shot
|
||||||
# $1= fb | dbox bzw. leer
|
# $1= fbshot | grab | dbox bzw. leer
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
do_fbshot()
|
do_fbshot()
|
||||||
{
|
{
|
||||||
if [ "$1" = "fb" ]; then
|
if [ "$1" = "fbshot" ]; then
|
||||||
shift 1
|
shift 1
|
||||||
if [ -e "$y_path_varbin/fbshot" ]; then
|
if [ -e "$y_path_varbin/fbshot" ]; then
|
||||||
$y_path_varbin/fbshot $*
|
$y_path_varbin/fbshot $*
|
||||||
else
|
else
|
||||||
fbshot $*
|
fbshot $*
|
||||||
fi
|
fi
|
||||||
|
elif [ "$1" = "grab" ]; then
|
||||||
|
shift 1
|
||||||
|
if [ -e "$y_path_varbin/grab" ]; then
|
||||||
|
$y_path_varbin/grab $*
|
||||||
|
else
|
||||||
|
grab $*
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
shift 1
|
shift 1
|
||||||
if [ -e "$y_path_varbin/dboxshot" ]; then
|
if [ -e "$y_path_varbin/dboxshot" ]; then
|
||||||
|
Reference in New Issue
Block a user