diff --git a/projects/robodj/bin/musicd b/projects/robodj/bin/musicd index 6b58e37b..b825562f 100755 --- a/projects/robodj/bin/musicd +++ b/projects/robodj/bin/musicd @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: musicd,v 1.6 2001/07/12 22:32:56 mdb Exp $ +# $Id: musicd,v 1.7 2001/07/12 23:42:38 mdb Exp $ # # MP3 audio server. Manages playlists of mp3 files that live on a local # filesystem. The playlists can be manipulated by connecting to the server @@ -115,8 +115,14 @@ sub handle_client } } elsif ($input =~ m/^REMOVE (\d+)/) { - # remove this songid from the playlist my $sid = $1; + + # if we're playing the song to remove, skip to the next song + if ($sid = $playing->[1]) { + play_next_tune(); + } + + # remove this songid from the playlist my $sidx = -1; my $i; @@ -145,7 +151,7 @@ sub handle_client (defined $playing ? $playing->[1] : "") . "\n"; my $entry; foreach $entry (@playlist) { - print $cfh join(":", @{$entry}) . "\n"; + print $cfh join("\t", @{$entry}) . "\n"; } } elsif ($input =~ m/^PLAYING/) {