def resolve_url(url):
duration=7500
try:
stream_url = urlresolver.HostedMediaFile(url=url).resolve()
# If urlresolver returns false then the video url was not resolved.
if not stream_url or not isinstance(stream_url, basestring):
try: msg = stream_url.msg
except: msg = url
xbmc.executebuiltin('Notification(%s, %s, %d, %s)'%('URL Resolver',msg, duration, addon_icon))
return False
except Exception as e:
try: msg = str(e)
except: msg = url
xbmc.executebuiltin('Notification(%s, %s, %d, %s)'%('URL Resolver',msg, duration, addon_icon))
return False
return stream_url
评论列表
文章目录