Permalink
Browse files
more logging of lame failures. fix params in fma script
- Loading branch information...
Showing
with
8 additions
and
5 deletions.
-
+7
−4
fma/fma.pl
-
+1
−1
stream.go
|
@@ -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 " ";
|
|
|
|
@@ -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