[lug] random album mp3 player
j davis
davis_compz at hotmail.com
Sun Nov 10 02:09:12 MST 2002
>>>Ben Luey wrote:
>>>
>>>>This is probably a ridiculously easy question. How do I play a random
>>>>album from my mp3 collection? Xmms and Zinf (formerly freeamp) will sort
>>>>a
>>>>playlist randomly, but I want to randomize by album, not by track /
>>>>individual file. Or, if it could select a random playlist, I could make
>>>>a
>>>>play list for each album. This seems like an easy task -- can xmms or
>>>>zinf
>>>>do this?
>>
>
>this might work if you put you playlist in /home/records
>
>HTH :)
>jd
>
>#! /usr/bin/perl
>@array = `ls /home/records`;
>$num = 0;
>foreach $i (@array){
> $num++;
>}
>srand; # not needed for 5.004 and
>$index = rand @array;
>$element = $array[$index];
>while( $num > "0"){
> `xmms $element`;
> $num--;
>}
and if this works you could easily add a xmessage saying
list over and maybe map a button so it restarts...also
i dont think this scrip will play every .pls you have...
maybe say while($i > -5)..might hear a repeat...
you could do some checking though.....
jd
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
More information about the LUG
mailing list