'Remove the song at index from the playlist.'

def cmd_delete(self, conn, index):

    index = cast_arg(int, index)
    try:
        del self.playlist[index]
    except IndexError:
        raise ArgumentIndexError()
    self.playlist_version += 1
    if (self.current_index == index):
        self.cmd_stop(conn)
    elif (index < self.current_index):
        self.current_index -= 1
