This file is indexed.

/usr/share/anyremote/cfg-data/Server-mode/mpd.cfg is in anyremote-data 6.5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
%
% anyremote configuration file for MPD management (Server-mode)
%
% prerequisites: mpc client, mpd must be started already with playlist prepared
%

% STATUS nonstable
% TODO who must start mpd and prepare playlist?
% XTEST no
% SOUND app
% ENV no
% ALL_IN_ONE 
% TODO make stable

GuiAppName=MPD
GuiAppBinary=mpc
GuiAppRun=P=`ps -ef|grep mpd|grep -v grep|grep -v anyremote|grep -v nedit|grep -v mpd.cfg`; if [ "x$P" = "x" ]; then echo NOK; else echo OK; fi
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=Music Player Daemon (MPD) allows remote access for playing music. Mpd should be started and playlist should be prepared before runing anyRemote.

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
	Macro(CheckMPC);\
	Macro(CheckMPD);\
	Macro(CheckPL);\
	Make(var,home,echo $HOME);\
	Make(var,player_name,by_value,MPD);\
	Include($(CfgDir)/Utils/aliases-server-player.cfg);
	
(Connect)=Make(mode,mpd);

Cancel=\
    Make(exit);

[Mode]=mpd_general

CheckMPC=\
	Exec(P=`which mpc 2> /dev/null|grep mpc|grep -v no|wc -l|tr -d " "`; \
	     if [ "x$P" = "x0" ]; then $(CfgDir)/Utils/message.sh "ERROR: mpc client is not installed"; fi);

CheckMPD=\
	Exec(P=`ps -ef|grep mpd|grep -v grep|grep -v mpd.cfg|wc -l|tr -d " "`; \
	     if [ "x$P" = "x0" ]; then $(CfgDir)/Utils/message.sh "ERROR: mpd is not run"; fi);

CheckPL=\
	Exec(P=`mpc playlist 2> /dev/null|wc -l|tr -d " "`; \
	     if [ "x$P" = "x0" ]; then $(CfgDir)/Utils/message.sh "ERROR: mpd playlist is empty"; fi);

MPD_SETTILE=\
	ExecAndSet(title,sleep 1;mpc|head -n1|while read name;do echo $name;done)

[ModeEnd]

[Mode]=mpd : mpd_general,default_player

(EnterMode)=\
	Macro(SETUP_DEFAULT_POWER_MANAGEMENT);\
	Macro(RUN_IF_NEED);\
	Macro(SETUP_DEFAULT_PLAYER);\
	Make(var,mpd_volume,by_value,-1);\
	Macro(APP_MENU);

(ExitMode) =Timer(MPD_SETTILE,cancel)

APP_MENU=\
	Set(menu,replace,Playlist,Toggle Shuffle,Toggle Repeat,PowerMgmt);\
	Macro(ALLIN1MENU);

Back=\
	Set(text,close);\
	Macro(APP_MENU);
	
Toggle Shuffle=\
	Exec(mpc shuffle);

Toggle Repeat=\
	Exec(mpc repeat);

Playlist=\
	Make(mode,mpd_playlist);

% Override
1=Exec(mpc volume -5)
2=Make(var,mpd_volume,\
        if [ "x$(mpd_volume)" = "x-1" ]; then \
	     mpc volume|tr -s " "|cut -f 2 -d " "|sed "s/%//";mpc volume 0 > /dev/null; \
	else \
	     mpc volume $(mpd_volume) > /dev/null;echo "-1"; \
	fi);
3=Exec(mpc volume +5)

PLAY=\
	Exec(mpc play);\
	Macro(MPD_SETTILE);\
	Timer(MPD_SETTILE,$(UpdateTimeout),0);

RWD=\
	Exec(mpc seek -00:00:05);

FF=\
	Exec(mpc seek +00:00:05);

PREV=\
	Exec(mpc prev);\
	Macro(MPD_SETTILE);

NEXT=\
	Exec(mpc next);\
	Macro(MPD_SETTILE);

STOP=\
	Exec(mpc stop);\
	Timer(MPD_SETTILE,cancel);

PAUSE=\
	Exec(mpc toggle);

RUN_IF_NEED=\
	Make(none);

RUN_OR_QUIT=\
	Make(none);

QUIT=\
	Exec(mpd --kill);

[ModeEnd]

[Mode]=mpd_playlist

(EnterMode)=\
	Timer(MPD_SETTILE,cancel);\
	Set(list,font,medium);\
	ExecAndSet(list,replace,Playlist,mpc playlist|tr -d ','|tr -s ' '|cut -f 2,3,4,5,6,7 -d " "|\
	                                 sed "s/%20/ /g;s/$/,/;s/,/\r/g;s/(/-/g;s/)/-/g;s/$/,/");\
	Set(menu,replace,Choose);
	
(ExitMode)=\
	Set(list,close);\
	Macro(MPD_SETTILE);\
	Timer(MPD_SETTILE,$(UpdateTimeout),0);

Back($$)=\
	Make(mode,mpd);

Choose($$)=\
	Exec(mpc play $(Index));

Push($$)=\
	Macro(Choose($$));

[ModeEnd]

[End]