'Check the contents of the image list.'

def check_imagelist(self):

    hub.update_smartcam_imageseries()
    image_ids = hub.get_image_info("$.imageSeries[?(@.deviceLabel=='%s')].image[0].imageId", self._device_label)
    if (not image_ids):
        return
    new_image_id = image_ids[0]
    if ((new_image_id == '-1') or (self._image_id == new_image_id)):
        _LOGGER.debug('The    image    is    the    same,    or    loading    image_id')
        return
    _LOGGER.debug('Download    new    image    %s', new_image_id)
    new_image_path = os.path.join(self._directory_path, '{}{}'.format(new_image_id, '.jpg'))
    hub.session.download_image(self._device_label, new_image_id, new_image_path)
    _LOGGER.debug('Old    image_id=%s', self._image_id)
    self.delete_image(self)
    self._image_id = new_image_id
    self._image = new_image_path
