wystarczy w pliku, z katalogu domowego XBMC
\home\xbmc\.xbmc\addons\plugin.video.tvnplayer.pl\default.py
zmienić definicję TVNPlayerItem:
def TVNPlayerItem(type, id):
urlQuery = '&type=%s&id=%s&sort=newest&m=getItem&deviceScreenHeight=1080&deviceScreenWidth=1920' % (type, id)
getItem = urllib2.urlopen(base_url + urlQuery)
json = simplejson.loads(getItem.read())
getItem.close()
video_content = json['item']['videos']['main']['video_content']
profile_name_list = []
for item in video_content:
profile_name = item['profile_name']
profile_name_list.append(profile_name)
if 'HD' in profile_name_list:
select = profile_name_list.index('HD')
elif 'Bardzo Wysoka' in profile_name_list:
select = profile_name_list.index('Bardzo Wysoka')
elif 'Wysoka' in profile_name_list:
select = profile_name_list.index('Wysoka')
else: select = xbmcgui.Dialog().select('Wybierz jakość', profile_name_list)
stream_url = json['item']['videos']['main']['video_content'][select]['url']
xbmcplugin.setResolvedUrl(pluginHandle, True, xbmcgui.ListItem(path=stream_url))