%
% anyremote configuration file for decibel-audio-player (http://decibel.silent-blade.org/) (Server-mode)
% 

% STATUS nonstable
% TODO shuffle works strange;RWD&FF works badly,playlist-add do not works
% XTEST yes
% SOUND mixer
% ENV no
% DEF_PLAYER   
% ALL_IN_ONE 

GuiAppName=Decibel
GuiAppBinary=decibel-audio-player
GuiAppRun=echo 'A=`ps -ef|grep decibel-audio-player|grep -v grep`; if [ "x$A" = "x" ]; then echo NOK; else echo OK; fi'|sh -s
GuiAppIcon=decibel-audio-player.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=Decibel Audio Player is a GTK+ open-source (GPL license) audio player designed for GNU/Linux, which aims at being very straightforward to use by mean of a very clean and user friendly interface.

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
	Macro(SETUP_DEFAULT_MIXER);\
	Make(var,player_name,by_value,Decibel);\
	Include($(CfgDir)/Utils/aliases-server-player.cfg);

(Connect)=\
	Make(mode,decibel-audio-player);

[Mode]=decibel-audio-player : default_player

% (EnterMode) by Utils/aliases-server-player.cfg

%playlist-add do not works in Decibel v0.09	
%APP_MENU=Set(menu,replace,Shuffle,Add to playlist,Power Off,Suspend);Macro(ALLIN1MENU);
APP_MENU=\
	Set(menu,replace,Shuffle,Power Off,Suspend);\
	Macro(ALLIN1MENU);

Shuffle=Exec(decibel-audio-player-remote shuffle);

%UpdateMenu=Set(menu,replace,GoTo,Add,Go Home);
%Add to playlist=Macro(FBROWSER_IC_FILL_LIST);Macro(UpdateMenu);
%GoTo    =Macro(FBROWSER_IC_GO_TO);
%Go Home =Macro(FBROWSER_IC_GO_HOME);
%Push($$) use from aliases-server-fbrowser-v3i.cfg

%Add($$)=Set(list,close);\
%	Exec(decibel-audio-player-remote pl-add "`cat $HOME/.anyRemote/ar_storedir.tmp`/$(Param)");\
%	Macro(APP_MENU);

% Volume control and 0-9,*,# assignments by Utils/aliases-server-player.cfg
%decibel-audio-player-remote volume 100

PLAY =Exec(decibel-audio-player-remote play);
RWD  =Emulate(key,Left);
FF   =Emulate(key,Right)
PREV =Exec(decibel-audio-player-remote prev)
STOP =Exec(decibel-audio-player-remote stop);
NEXT =Exec(decibel-audio-player-remote next)
PAUSE=Exec(decibel-audio-player-remote pause);

* *=Set(text,replace,Help,1 Vol-\n2 Mute\n3 Vol+\n4 RWD\n5 Play\n6 Next\n7 FF\n8 Stop\n9 Next\n** Help\n0 Pause\n# Quit\n* # - Run/Quit)

RUN_IF_NEED=Exec(P=`ps -ef|grep decibel-audio-player|grep -v grep`; if [ "x$P" = "x" ]; then decibel-audio-player & fi);
RUN_OR_QUIT=Exec(P=`ps -ef|grep decibel-audio-player|grep -v grep`; if [ "x$P" = "x" ]; then decibel-audio-player & else pkill -f "python.*decibel-audio-player"; fi)
QUIT=Exec(pkill -f "python.*decibel-audio-player");

[ModeEnd]

[End]
