Permalink
Browse files

more logging of lame failures. fix params in fma script

  • Loading branch information...
mkb218 committed Jun 29, 2012
1 parent cd58426 commit 4482b278c4ea6670a1b70b63688ee26bcd63a33e
Showing with 8 additions and 5 deletions.
  1. +7 −4 fma/fma.pl
  2. +1 −1 stream.go
View
@@ -67,15 +67,18 @@
print length($rawdata)."\n";
my $ua = LWP::UserAgent->new;
my $play = "off";
- if (rand() < 0.08) {
+ my $playchoice = rand();
+ warn $playchoice;
+ if ($playchoice < 0.16) {
+ warn "play";
$play = "on";
}
+ warn $play;
my %args = ( add => "on",
filetype => "mp3",
- play => $play,
+ playback => $play,
fma_url => $track_url,
- filedata => ["fma.tmp"],
- add => "on");
+ filedata => ["fma.tmp"]);
my $worked = $ua->request(POST "http://$hostport:9001/upload", Content => \%args, Content_Type => 'form-data');
print $worked->code;
print " ";
View
@@ -75,7 +75,7 @@ func FileProc() {
// f := File{ar.artist, ar.title, make([]byte,0)}
p, err := exec.LookPath("lame")
if err != nil {
- log.Panic("no lame found! CAN'T STREAM. DYING.")
+ log.Panic("no lame found! CAN'T STREAM. DYING.", err)
}
f := func() string {
listenlock.Lock()

0 comments on commit 4482b27

Please sign in to comment.