代码如下:- #!/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"
复制代码
|