Skip to content

Commit

Permalink
Added support for partial resuming
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjomckay committed Jun 14, 2020
1 parent 15fa615 commit b86f478
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def mode_episode(pid):
'comment': programme_json["short_synopsis"]
})

xbmc.Player().play(picked_url, play_item)
xbmcplugin.setResolvedUrl(addon_handle, True, listitem=play_item)

if picked_url is None:
xbmcgui.Dialog().notification(__addonname__, "Episode not available to stream", icon=xbmcgui.NOTIFICATION_ERROR)
Expand Down Expand Up @@ -265,10 +265,14 @@ def mode_station_date(pid, year, month, day):
title = time + ": " + episode["name"]

url = build_url({'mode': 'episode', 'pid': episode["identifier"]})

list_item = xbmcgui.ListItem(title)
list_item.setInfo('video', {'plot': episode["description"]})
list_item.setPath(url)
list_item.setProperty('IsPlayable', "true")
list_item.setThumbnailImage(episode["image"])
xbmcplugin.addDirectoryItem(addon_handle, url, list_item)

xbmcplugin.addDirectoryItem(addon_handle, url, list_item, isFolder=False)

xbmcplugin.endOfDirectory(addon_handle)

Expand Down

0 comments on commit b86f478

Please sign in to comment.