1% 2% anyremote configuration file for AlsaPlayer (http://www.alsaplayer.org/) (Server-mode) 3% 4 5% STATUS stable 6% XTEST no 7% SOUND mixer 8% ENV no 9% DEF_PLAYER 10% ALL_IN_ONE 11% FBROWSER v.4i 12% MEDIACENTER audio 13 14GuiAppName=AlsaPlayer 15GuiAppBinary=alsaplayer 16GuiAppRun=echo 'A=`pgrep alsaplayer`; if [ "x$A" = "x" ]; then echo NOK; else echo OK; fi'|sh -s 17GuiAppIcon=alsaplayer.png 18GuiAppType=Application 19GuiAppProtocols=Server 20GuiAppDesc=AlsaPlayer is a new type of PCM player. It has some very interesting features unique to Linux/Unix players. The goal is to create a fully pluggable framework for playback of all sorts of media with the focus on PCM audio data. 21 22[Protocol]=Server 23 24(Init)=\ 25 Include($(CfgDir)/Utils/aliases-server.cfg);\ 26 Include($(CfgDir)/Utils/aliases-server-fbrowser-v4i.cfg);\ 27 Macro(SETUP_DEFAULT_MIXER);\ 28 Macro(FBROWSER_IC_INIT);\ 29 Make(var,player_name,by_value,AlsaPlayer);\ 30 Include($(CfgDir)/Utils/aliases-server-player.cfg);\ 31 Make(var,cover_size,by_value,);\ 32 Make(var,alsaplayer_layout,\ 33 V=`$(CfgDir)/Utils/registry.sh $(TmpDir) get alsaplayer_layout`;\ 34 if [ "x$V" = "x" ]; then echo "5x1"; else echo $V; fi); 35 36(Exit)=\ 37 Macro(FBROWSER_IC_EXIT);\ 38 Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set alsaplayer_layout $(alsaplayer_layout)); 39 40(Connect)=\ 41 Make(mode,alsaplayer_$(alsaplayer_layout)); 42 43[Mode]=alsaplayer_general 44 45PLAY=\ 46 Exec(alsaplayer --start);\ 47 Macro(APLAYER_TITLE);\ 48 Timer(APLAYER_TITLE,$(UpdateTimeout),0); 49 50RWD=\ 51 Exec(alsaplayer --relative -5) 52 53FF=\ 54 Exec(alsaplayer --relative 5) 55 56PREV=\ 57 Exec(alsaplayer --prev);\ 58 Macro(APLAYER_TITLE); 59 60STOP=\ 61 Timer(APLAYER_TITLE,cancel);\ 62 Exec(alsaplayer --stop);\ 63 Set(title,);\ 64 Set(status,); 65 66NEXT=\ 67 Exec(alsaplayer --next);\ 68 Macro(APLAYER_TITLE); 69 70PAUSE=\ 71 Exec(alsaplayer --pause); 72 73RUN_IF_NEED=\ 74 Exec($(CfgDir)/Utils/run-or-switch-to.sh alsaplayer); 75 76RUN_OR_QUIT=\ 77 Make(var,aplayer_cmd,\ 78 P=`pgrep alsaplayer`;\ 79 if [ "x$P" = "x" ]; then echo RUN_IF_NEED else echo APP_QUIT; fi);\ 80 Macro($(aplayer_cmd)); 81 82APP_QUIT=\ 83 Timer(APLAYER_TITLE,cancel);\ 84 Exec(alsaplayer --quit); 85 86% Repeat commands does not works 87Repeat 1=\ 88 Exec(alsaplayer --loopsong); 89 90Repeat List=\ 91 Exec(alsaplayer --looplist); 92 93Files=\ 94 Make(mode,alsaplayer_filebrowser); 95 96Playlist=\ 97 Make(mode,alsaplayer_playlist); 98 99Play reversely=\ 100 Exec(alsaplayer --speed -1.0); 101 102Play normal=\ 103 Exec(alsaplayer --speed 1.0); 104 105Layout 3x4=\ 106 Make(mode,alsaplayer_3x4); 107 108Layout 7x1=\ 109 Make(mode,alsaplayer_7x1); 110 111Layout 5x1=\ 112 Make(mode,alsaplayer_5x1); 113 114[ModeEnd] 115 116[Mode]=alsaplayer_3x4 : alsaplayer_general,default_player 117 118% (EnterMode) by Utils/aliases-server-player.cfg 119% PowerMgmt by Utils/aliases-server.cfg 120 121APP_MENU=\ 122 Set(menu,replace,Files,Playlist,Layout 7x1,Layout 5x1,PowerMgmt);\ 123 Macro(ALLIN1MENU);\ 124 Macro(MEDIACENTER_MENU); 125 126APP_POST_SETUP=\ 127 Make(var,alsaplayer_layout,by_value,3x4); 128 129%APLAYER_GETVOL=\ 130% Make(var,aplayer_volume,alsaplayer --status|grep 'volume:'|sed 's/^volume: //'); 131 132APLAYER_TITLE=\ 133 ExecAndSet(title,alsaplayer --status|grep 'path:'|sed "s/^path: //"); 134 135* 4=Exec(alsaplayer --speed -1.0); 136* 6=Exec(alsaplayer --speed 1.0); 137* *=Set(text,replace,Help,1 Vol-\n2 Mute\n3 Vol+\n4 RWD\n5 Play\n6 Next\n7 FF\n8 Stop\n9 Next\n* 4 Play reversely\n * 6 Play normal speed\n ** Help\n0 Pause\n# Quit\n* # - Run/Quit) 138 139[ModeEnd] 140 141[Mode]=alsaplayer_cover 142 143APLAYER_TITLE=\ 144 ExecAndSet(title,alsaplayer --status|grep 'path:'|sed "s/^path: //");\ 145 Macro(APP_COVER, if [ "x$(cover_size)" = "x" ]; then echo 1; else echo 0; fi); 146 147APP_COVER=\ 148 Make(var,media_file,alsaplayer --status|grep 'path:'|sed "s/^path: //;s/'/'\\\''/g;s/\//\'\/\'/g;s/$/\'/g;s/^'\//\//");\ 149 Macro(DEFAULT_COVER); 150 151[ModeEnd] 152 153[Mode]=alsaplayer_7x1 : alsaplayer_general,default_player_7x1,alsaplayer_cover 154 155% (EnterMode) by Utils/aliases-server-player.cfg 156APP_MENU=\ 157 Set(menu,replace,Files,Playlist,Mute,Next Cover,Previous Cover,Update Cover,Play reversely,Play normal,Layout 3x4,Layout 5x1,Help,PowerMgmt);\ 158 Macro(ALLIN1MENU);\ 159 Macro(MEDIACENTER_MENU); 160 161APP_POST_SETUP=\ 162 Make(var,alsaplayer_layout,by_value,7x1); 163 164% Mute, Next Cover,Previous Cover,Update Cover by Utils/aliases-server-player.cfg 165% PowerMgmt by Utils/aliases-server.cfg 166 167[ModeEnd] 168 169[Mode]=alsaplayer_5x1 : alsaplayer_general,default_player_5x1,alsaplayer_cover 170 171% no timer 172PLAY=\ 173 Exec(alsaplayer --start);\ 174 Macro(APLAYER_TITLE); 175 176% (EnterMode) by Utils/aliases-server-player.cfg 177APP_MENU=\ 178 Set(menu,replace,Files,Playlist,Mute,Next Cover,Previous Cover,Update Cover,Play reversely,Play normal,Layout 3x4,Layout 7x1,Help,PowerMgmt);\ 179 Macro(ALLIN1MENU);\ 180 Macro(MEDIACENTER_MENU); 181 182APP_POST_SETUP=\ 183 Make(var,alsaplayer_layout,by_value,5x1); 184 185% Mute, Next Cover,Previous Cover,Update Cover by Utils/aliases-server-player.cfg 186% PowerMgmt by Utils/aliases-server.cfg 187 188APP_PLAY_STATUS=\ 189 Make(var,app_status,\ 190 OUT=`alsaplayer --status|grep "speed: 0%\|^length:"`;\ 191 L0=`echo $OUT|grep 'length: 0 seconds'|wc -l`;\ 192 if [ "x$L0" = "x1" ]; then echo stopped;\ 193 else \ 194 S0=`echo $OUT|grep speed|wc -l`;\ 195 if [ "x$S0" = "x1" ]; then echo paused;\ 196 else echo playing; fi;\ 197 fi); 198 199APP_TITLE=\ 200 Macro(APLAYER_TITLE); 201 202[ModeEnd] 203 204[Mode]=alsaplayer_nobutton 205 206% bug-prone :) 2071=Make(mode,alsaplayer_$(alsaplayer_layout)); 2082=Make(mode,alsaplayer_$(alsaplayer_layout)); 2093=Make(mode,alsaplayer_$(alsaplayer_layout)); 2104=Make(mode,alsaplayer_$(alsaplayer_layout)); 2115=Make(mode,alsaplayer_$(alsaplayer_layout)); 2126=Make(mode,alsaplayer_$(alsaplayer_layout)); 2137=Make(mode,alsaplayer_$(alsaplayer_layout)); 2148=Make(mode,alsaplayer_$(alsaplayer_layout)); 2159=Make(mode,alsaplayer_$(alsaplayer_layout)); 216*=Make(mode,alsaplayer_$(alsaplayer_layout)); 2170=Make(mode,alsaplayer_$(alsaplayer_layout)); 218#=Make(mode,alsaplayer_$(alsaplayer_layout)); 219 220[ModeEnd] 221 222% rely on $(alsaplayer_layout) variable 223[Mode]=alsaplayer_playlist : alsaplayer_nobutton 224 225(EnterMode)=\ 226 ExecAndSet(list,replace,Playlist,\ 227 cd;cat .alsaplayer/alsaplayer.m3u|sed "s/'//g"|xargs -i basename {}|sed 's/\*//;s/@//;s/,/ /g;s/$/,/');\ 228 Set(menu,replace,Jump,Clear); 229 230Push($$)=\ 231 Macro(JUMP); 232 233Jump($$)=\ 234 Macro(JUMP); 235 236JUMP=\ 237 Set(list,close);\ 238 Exec(alsaplayer --jump $(Index));\ 239 Make(mode,alsaplayer_$(alsaplayer_layout); 240 241Clear($$)=\ 242 Set(list,clear);\ 243 Exec(alsaplayer --clear);\ 244 Exec(rm -f $(Home)/.alsaplayer/alsaplayer.m3u; touch $(Home)/.alsaplayer/alsaplayer.m3u); 245 246Back($$)=\ 247 Set(list,close);\ 248 Make(mode,alsaplayer_$(alsaplayer_layout)); 249 250[ModeEnd] 251 252% rely on $(alsaplayer_layout) variable 253[Mode]=alsaplayer_filebrowser : alsaplayer_nobutton 254 255(EnterMode)=\ 256 Macro(FBROWSER_IC_FILL_LIST);\ 257 Macro(UpdateMenu); 258 259UpdateMenu=\ 260 Set(menu,replace,GoTo,Add,Go Home); 261 262GoTo($$)=\ 263 Macro(FBROWSER_IC_GO_TO); 264 265Go Home($$)=\ 266 Macro(FBROWSER_IC_GO_HOME); 267 268%Push($$) use from aliases-server-fbrowser-v4i.cfg 269 270Add($$)=\ 271 Exec(alsaplayer -e "$(fbrowser_dir)"/$(Param));\ 272 Exec(echo "$(fbrowser_dir)"/$(Param) >> $(Home)/.alsaplayer/alsaplayer.m3u); 273 274Back($$)=\ 275 Set(list,close);\ 276 Make(mode,alsaplayer_$(alsaplayer_layout)); 277 278[ModeEnd] 279 280[End] 281