标题: [原创代码] CGI版Android远程音乐播放器 [打印本页]
作者: 111 时间: 2016-6-3 13:33 标题: CGI版Android远程音乐播放器
代码如下:- #!/system/bin/sh
- echo "Content-type: text/html"
- echo ""
- killall com.android.music
- pdg(){
- wbn=""
- co="0"
- ls "/sdcard/Music"|while read nr
- do
- co=$(($co+1))
- [ "$QUERY_STRING" == "$co" ]&&echo "$nr"
- done
- }
- echo '<title>音乐播放平台</title>'
- co=0
- ls /sdcard/Music | while read nr
- do
- co=$(($co+1))
- echo "<a href="music.cgi?$co">$co.$nr</a><br>"
- done
- int="`pdg`"
- [ -f "/sdcard/Music/$int" ]&&am start -n com.android.music/com.android.music.MediaPlaybackActivity -d "/sdcard/Music/$int"
复制代码
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |