sys.stderr = open(os.devnull, "w")
content = getUrl('https://news.nbdom.net/videos/kodi/')
+ list = []
for row in json.loads(content):
#row['link'] = ytUrl(row['id'])
#row['link'] = resolve_url(row['link'])
info['year'] = date.year
info['premiered'] = date.strftime('%Y-%m-%d') #'-'.join([date.year,date.month,date.day])
info['dateadded'] = row['created']
- info['date'] = row['created']
+ info['date'] = date.strftime('%Y-%m-%d')
info['aired'] = row['created']
if 'id' in row:
#li.setLabel2('setLabel2')
#li.setThumbnailImage(thumbnailImage)
- xbmcplugin.addDirectoryItem(handle=addon_handle,url=info['link'],listitem=li)
+ list.append([info['link'],li])
+ # NB 04.07.19: Use xbmcplugin.addDirectoryItems, suppose to be faster
+ #xbmcplugin.addDirectoryItem(handle=addon_handle,url=info['link'],listitem=li)
# NB 17.04.19 url = 'https://nbdom.net/data/en/911-experiments-The_Force_Behind_the_Motion.mp4'
# NB 17.04.19 li = xbmcgui.ListItem('My First Video!', iconImage='DefaultVideo.png')
# NB 17.04.19 xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)
if not TEST:
+ xbmcplugin.addDirectoryItems(addon_handle,list,len(list))
xbmcplugin.endOfDirectory(addon_handle)
#