'When the client exists try to send refresh request to Emby.'

def update(self, lib):

    self._log.info(u'Updating    Emby    library...')
    host = config['emby']['host'].get()
    port = config['emby']['port'].get()
    username = config['emby']['username'].get()
    password = config['emby']['password'].get()
    token = config['emby']['apikey'].get()
    if (not any([password, token])):
        self._log.warning(u'Provide    at    least    Emby    password    or    apikey.')
        return
    user = get_user(host, port, username)
    if (not user):
        self._log.warning(u'User    {0}    could    not    be    found.'.format(username))
        return
    if (not token):
        auth_data = password_data(username, password)
        headers = create_headers(user[0]['Id'])
        token = get_token(host, port, headers, auth_data)
        if (not token):
            self._log.warning(u'Could    not    get    token    for    user    {0}', username)
            return
    headers = create_headers(user[0]['Id'], token=token)
    url = api_url(host, port, '/Library/Refresh')
    r = requests.post(url, headers=headers)
    if (r.status_code != 204):
        self._log.warning(u'Update    could    not    be    triggered')
    else:
        self._log.info(u'Update    triggered.')
