def update_plex():
Logger.info("plex - sending request to update Plex")
url = 'http://%s/library/sections/all/refresh?X-Plex-Token=%s' % (PLEX_IP, PLEX_TOKEN)
try:
urllib2.urlopen(url).read()
except urllib2.HTTPError, e:
Logger.warning("plex - unable to make request to Plex - HTTP Error %s", str(e.code))
except urllib2.URLError, e:
Logger.warning("plex - unable to make request to Plex - URL Error %s", e.reason)
else:
Logger.info("plex - update successful")
评论列表
文章目录