def play_film(identifier): mubi_resolved_info = mubi.get_play_url(identifier) mubi_film = xbmcgui.ListItem(path=mubi_resolved_info['url']) if mubi_resolved_info['is_mpd']: mubi_film.setProperty('inputstreamaddon', 'inputstream.adaptive') mubi_film.setProperty('inputstream.adaptive.manifest_type', 'mpd') if mubi_resolved_info['drm_header'] is not None: xbmc.log('DRM Header: %s' %mubi_resolved_info['drm_header'], 2) mubi_film.setProperty('inputstream.adaptive.license_type', "com.widevine.alpha") mubi_film.setProperty('inputstream.adaptive.license_key', LICENSE_URL + '|' + LICENSE_URL_HEADERS + '&dt-custom-data=' + mubi_resolved_info['drm_header'] + '|R{SSM}|JBlicense') mubi_film.setMimeType('application/dash+xml') mubi_film.setContentLookup(False) return xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem=mubi_film)
def __init__(self, label=None, label2=None, icon=None, thumbnail=None, path=None): """Defaults are an emtpy string since xbmcgui.ListItem will not accept None. """ self._listitem = xbmcgui.ListItem(label=label, label2=label2, path=path) # The docs have the thumbnail property set as thumb # http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem-setArt self._art = {'icon': icon, 'thumb': thumbnail} self._icon = icon self._path = path self._thumbnail = thumbnail self._context_menu_items = [] self._played = False self.is_folder = True