def update_plex(host, port, token, library_name):
 section_key = get_music_section(host, port, token, library_name)
 api_endpoint = 'library/sections/{0}/refresh'.format(section_key)
 api_endpoint = append_token(api_endpoint, token)
 url = urljoin('http://{0}:{1}'.format(host, port), api_endpoint)
 r = requests.get(url)
 return r

def update_plex ( host , port , token , library_name ) : section_key = get_music_section ( host , port , token , library_name ) api_endpoint = 'library/sections/{0}/refresh' . format ( section_key ) api_endpoint = append_token ( api_endpoint , token ) url = urljoin ( 'http://{0}:{1}' . format ( host , port ) , api_endpoint ) r = requests . get ( url ) return r
sends request to the plex api to start a library refresh .