(self, status)
Updates the RAMP status.
Updates the RAMP status.
Updates the RAMP status .
def _update_status(self, status):
        """ Updates the RAMP status. """
        con_inf = status.get(RAMP_ATTR_CONTENT_INFO, {})

        self.state = status.get(RAMP_STATUS_ATTR_STATE, 0)
        self.volume = status.get(RAMP_STATUS_ATTR_VOLUME, 1)
        self.muted = status.get(RAMP_STATUS_ATTR_MUTED, False)
        self.content_id = status.get(RAMP_STATUS_ATTR_CONTENT_ID)
        self.title = status.get(RAMP_STATUS_ATTR_TITLE)
        self.artist = con_inf.get(RAMP_STATUS_CONTENT_INFO_ATTR_ARTIST)
        self.album = con_inf.get(RAMP_STATUS_CONTENT_INFO_ATTR_ALBUM_TITLE)
        self._current_time = status.get(RAMP_STATUS_ATTR_CURRENT_TIME, 0)
        self.duration = status.get(RAMP_STATUS_ATTR_DURATION, 0)
        self.image_url = status.get(RAMP_STATUS_ATTR_IMAGE_URL)
        self.time_progress = status.get(RAMP_ATTR_TIME_PROGRESS, False)

        self.last_updated = dt.datetime.now()
def _update_status ( self , status ) : con_inf = status . get ( RAMP_ATTR_CONTENT_INFO , { } ) self . state = status . get ( RAMP_STATUS_ATTR_STATE , 0 ) self . volume = status . get ( RAMP_STATUS_ATTR_VOLUME , 1 ) self . muted = status . get ( RAMP_STATUS_ATTR_MUTED , False ) self . content_id = status . get ( RAMP_STATUS_ATTR_CONTENT_ID ) self . title = status . get ( RAMP_STATUS_ATTR_TITLE ) self . artist = con_inf . get ( RAMP_STATUS_CONTENT_INFO_ATTR_ARTIST ) self . album = con_inf . get ( RAMP_STATUS_CONTENT_INFO_ATTR_ALBUM_TITLE ) self . _current_time = status . get ( RAMP_STATUS_ATTR_CURRENT_TIME , 0 ) self . duration = status . get ( RAMP_STATUS_ATTR_DURATION , 0 ) self . image_url = status . get ( RAMP_STATUS_ATTR_IMAGE_URL ) self . time_progress = status . get ( RAMP_ATTR_TIME_PROGRESS , False ) self . last_updated = dt . datetime . now ( )