Skip to content

Instantly share code, notes, and snippets.

@extremecoders-re
Last active January 19, 2019 11:14
Show Gist options
  • Save extremecoders-re/d603d062811b826e93acba5350a0e718 to your computer and use it in GitHub Desktop.
Save extremecoders-re/d603d062811b826e93acba5350a0e718 to your computer and use it in GitHub Desktop.
get_video_url fix
def get_video_url(url):
videos = []
params = []
addon_log(url)
xbmc.log(url, level=xbmc.LOGWARNING)
quality = (Addon.getSetting('qualityType')).lower()
resp = api_hotstar_request(url, auth=True)
manifest1 = resp['body']['results']['item']['playbackUrl']
addon_log('manifest1 is, '+manifest1)
if 'hsprepack' in manifest1:
listitem =xbmcgui.ListItem('name')
listitem.setPath(manifest1)
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
setView('movies', 'movie-view')
xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=True)
if 1 == 1:
return
islive=False
if '/videos/' not in manifest1:
islive=True
quality='let me choose'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment