xmms- jukebox v2 - again.
Robin Gareus <[email protected]>
| Newsgroups | gmane.comp.multimedia.xmms.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi. so this time with correct attachments: patch for latest xmms version. and "m3u to topten" bash script. documentation see previous mail. have fun, robin _______________________________________________ xmms-devel mailing list [email protected] http://lists.xmms.org/mailman/listinfo/xmms-devel
xmms-1.2.10-rg2.dif.gz
(application/gzip, 12 KB) - not displayed
topten.sh
(text/x-sh, 947 B)
#!/bin/bash # # (C) GPL 2004 <[email protected]> # # simple bash script to ceate a TOP-TEN from a m3u # playlist file. # # INFILE="/tmp/playlist.m3u" # # how many entries to display (TOP TEN: 10) # TOP_N=10 # NOTE: "//" are substitued to "/" # # These prefixes are removed from playlist entries # PREFIX_0="/home/rgareus/tmp/scache/" PREFIX_1="http:/localhost:8080/musix/" N_PREFIX="/" # # BEGIN CODE # N_EXPR=$(echo $N_PREFIX | sed 's/\//\\\//g') EXPR0=$(echo $PREFIX_0 | sed 's/\//\\\//g') EXPR1=$(echo $PREFIX_1 | sed 's/\//\\\//g') clear echo " ** TOP $TOP_N mp3 songs **" echo " rank plays Path/Title" sed 's/\/\/*/\//g' $INFILE | sed 's/^'$EXPR0'/'$N_EXPR'/' | sed 's/^'$EXPR1'/'$N_EXPR'/' | sort | awk 'BEGIN{old=""; cnt=1;} //{if (old==$1) {cnt++;} else if (length(old) > 0) { printf("%05i %s\n",cnt,old); cnt=1;} old=$1;} END{printf("%05i %s\n",cnt,old);}' | sort -r | cat -n | head -n $TOP_N