%
% anyremote configuration file for xdtv management. (Server-mode)
% prerequisites: xdtv, xdtv_cmd
%

% STATUS stable
% XTEST no
% SOUND app
% ENV no

GuiAppName=XdTV
GuiAppBinary=xdtv
GuiAppRun=echo 'P=`ps -ef|grep xdtv|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" == "x" ]; then echo NOK; else echo OK; fi' | bash -f -s
GuiAppIcon=xdtv.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=XdTV is a software to watch, record and stream TV

[Protocol]=Server

(Init)=Include($(CfgDir)/Utils/aliases-server.cfg);
(Connect)=Make(mode,xdtv);


XDTV_VOLDN=Exec(xdtv_cmd "volume dec")
XDTV_MUTE=Exec(xdtv_cmd "volume tvmute")
XDTV_VOLUP=Exec(xdtv_cmd "volume inc")
XDTV_CHDN=Exec(xdtv_cmd "setchannel prev");
XDTV_ZOOM=Exec(xdtv_cmd fullscreen)
XDTV_CHUP=Exec(xdtv_cmd "setchannel next");

[Mode]=xdtv

(EnterMode)=Exec(echo 'P=`ps -ef|grep xdtv|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" == "x" ]; then xdtv -capt_width 720 -capt_height 576& fi' |bash -f -s);\
	Set(status,Type channel number);\
	Set(title,);\
	Set(icons,SAME,0,default,1,default,2,default,3,default,4,default,5,default,6,default,7,default,8,default,9,default,#,refresh,*,question);\
	Macro(XDTV_MENU)
(ExitMode)=Set(status,);

XDTV_MENU=Set(menu,replace,);Macro(ALLIN1MENU)

Cancel=Exec(xdtv_cmd quit);
Back=Set(text,close);Macro(XDTV_MENU)

0=Exec(xdtv_cmd "keypad 0");
1=Exec(xdtv_cmd "keypad 1");
2=Exec(xdtv_cmd "keypad 2");
3=Exec(xdtv_cmd "keypad 3");
4=Exec(xdtv_cmd "keypad 4");
5=Exec(xdtv_cmd "keypad 5");
6=Exec(xdtv_cmd "keypad 6");
7=Exec(xdtv_cmd "keypad 7");
8=Exec(xdtv_cmd "keypad 8");
9=Exec(xdtv_cmd "keypad 9");

* *=Set(text,replace,Help,Press numeric buttons\n to choose channel.\n* # run/quit\n# switch mode)
* #=Exec(echo 'D=`ps -ef|grep xdtv|grep -v anyremote`; if [ "x$D" == "x" ]; then xdtv -capt_width 720 -capt_height 576 & else xdtv_cmd quit; fi;'|bash -f -s)
#=Make(mode,xdtv2);

[ModeEnd]

[Mode]=xdtv2

(EnterMode)=Set(layout,default);\
	Set(icons,XdTv,1,vol_down,2,mute,3,vol_up,4,prev,5,fullscreen,6,next,7,default,8,default,9,default,0,default,#,refresh,*,question);\
	Macro(XDTV_MENU)
(ExitMode)=Set(status,);

Back=Set(text,close);Macro(XDTV_MENU)

1=Macro(XDTV_VOLDOWN)
2=Macro(XDTV_MUTE)
3=Macro(XDTV_VOLUP)

4=Macro(XDTV_CHDN)
5=Macro(XDTV_ZOOM)
6=Macro(XDTV_CHUP)

7=Make(none)
8=Make(none)
9=Make(none)

* *=Set(text,replace,Help,1 - Vol-\n2 - Mute\n3 - Vol+\n4 - Ch-\n5 - Fullscreen\n6 - Ch +\n** - Help\n# - switch mode)
0=Make(none)
#=Make(mode,xdtv)

[ModeEnd]
 
[End]
