Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ices0 w/ custom perl module help

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Sat May 26, 2007 10:34 pm    Post subject: ices0 w/ custom perl module help Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber