diff --git a/projects/robodj/bin/musicd b/projects/robodj/bin/musicd index ffae20c0..314213eb 100755 --- a/projects/robodj/bin/musicd +++ b/projects/robodj/bin/musicd @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: musicd,v 1.10 2001/07/13 00:39:32 mdb Exp $ +# $Id: musicd,v 1.11 2001/07/26 19:26:55 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 @@ -130,6 +130,8 @@ sub handle_client if ($playlist[$i]->[1] == $sid) { $sidx = $i; splice(@playlist, $i, 1); + # adjust the playing index if necessary + $index -= 1 if ($i < $index); last; } }