def cmd_play(self, conn, index=-1):
        index = cast_arg(int, index)

        if index < -1 or index > len(self.playlist):
            raise ArgumentIndexError()

        if index == -1:  # No index specified: start where we are.
            if not self.playlist:  # Empty playlist: stop immediately.
                return self.cmd_stop(conn)
            if self.current_index == -1:  # No current song.
                self.current_index = 0  # Start at the beginning.
            # If we have a current song, just stay there.

        else:  # Start with the specified index.
            self.current_index = index

        self.paused = False
Begin playback, possibly at a specified playlist index.
dataset/ETHPy150Open beetbox/beets/beetsplug/bpd/__init__.py/BaseServer.cmd_play