If the currently playing track is REMOVEd, skip to the next tune.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@172 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -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] : "<none>") . "\n";
|
||||
my $entry;
|
||||
foreach $entry (@playlist) {
|
||||
print $cfh join(":", @{$entry}) . "\n";
|
||||
print $cfh join("\t", @{$entry}) . "\n";
|
||||
}
|
||||
|
||||
} elsif ($input =~ m/^PLAYING/) {
|
||||
|
||||
Reference in New Issue
Block a user