Skip to content

Commit

Permalink
Fix paly url
Browse files Browse the repository at this point in the history
  • Loading branch information
airenas committed Oct 18, 2019
1 parent 8b5680d commit 98adf0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,15 @@ def list_videos(url):
def get_play_url(url):
data = json.load(urllib2.urlopen(
'https://www.lrt.lt/servisai/stream_url/vod/media_info/?url=' + url))
return data["url"]
return data["playlist_item"]["file"]

############################################################################


def play_video(url):
xbmc.log("Play " + url, level=xbmc.LOGNOTICE)
play_url = get_play_url(url)
xbmc.log("Got play URL " + play_url, level=xbmc.LOGNOTICE)
play_item = xbmcgui.ListItem(path=play_url)
xbmcplugin.setResolvedUrl(_handle, True, listitem=play_item)

Expand Down

0 comments on commit 98adf0c

Please sign in to comment.