(self)
Airplay sometimes sends a play command twice and since XBMC
        does not offer a seperate play and pause command we'll have
        to check the current player state and choose an action
        accordingly.
        
        If an error is returned there's not currently playing any
        media, so we can send the play command.
        
        If there's a response and the videoplayer is currently playing
        we can also send the play command.
Airplay sometimes sends a play command twice and since XBMC
        does not offer a seperate play and pause command we'll have
        to check the current player state and choose an action
        accordingly.
        
        If an error is returned there's not currently playing any
        media, so we can send the play command.
        
        If there's a response and the videoplayer is currently playing
        we can also send the play command.
Airplay sometimes sends a play command twice and since XBMC does not offer a seperate play and pause command we ll have to check the current player state and choose an action accordingly . If an error is returned there s not currently playing any media so we can send the play command . If there s a response and the videoplayer is currently playing we can also send the play command .
def play(self):
        """
        Airplay sometimes sends a play command twice and since XBMC
        does not offer a seperate play and pause command we'll have
        to check the current player state and choose an action
        accordingly.
        
        If an error is returned there's not currently playing any
        media, so we can send the play command.
        
        If there's a response and the videoplayer is currently playing
        we can also send the play command.
        """
        response, error = self.get_player_state('videoplayer')
        
        if error or response and response['paused']:
            self._play()
def play ( self ) : response , error = self . get_player_state ( 'videoplayer' ) if error or response and response [ 'paused' ] : self . _play ( )