Anonymous Guest
|
Posted: Sat May 26, 2007 10:34 pm Post subject: ices0 w/ custom perl module help |
|
|
Hi, I'm running icecast 2.3.1 and ices0.4 on a slackware 11 box.
I've written a perl module to use, however something is amiss.
when I run
| Code: |
| # ices -v -c /etc/ices/ices1.conf |
Everything works fine until:
| Code: |
DEBUG: perl [ices_get_next] returned 1 values, last [/music/460 - 18 Stuff You Gotta Watch.mp3]
DEBUG: Done interpreting [ices_get_next]
DEBUG: Interpreting [ices_get_lineno]
DEBUG: perl [ices_get_lineno] returned 1 values, last [460]
DEBUG: Done interpreting [ices_get_lineno]
DEBUG: Filename cleaned up from [/music/460 - 18 Stuff You Gotta Watch.mp3] to [460 - 18 Stuff You Gotta Watch]
Exiting after 10 consecutive errors.
DEBUG: Interpreting [ices_shutdown]
Shutting down perl subsystem...
DEBUG: perl [ices_shutdown] returned 1 values, last [1]
DEBUG: Done interpreting [ices_shutdown]
Ices Exiting...
|
Here is my ices_get_next sub:
| Code: |
sub ices_get_next {
print "Perl selecting the next track...\n";
system("ls -1 | tee $dir/list");
my $i = 0;
my @filearray;
open(READLIST,"$dir/list") or die "$!";
for $line (<READLIST>) {
if($line =~ /^\d{3}/) {
@filearray[$i] = $line;
$i++;
}
}
close(READLIST);
$filename = "$dir/@filearray[int(rand($i+1))]";
return "$filename";
}
|
Any help would be greatly appreciated. |
|