2016-03-25, 13:39
Hello,
I am running the following code to stream Video's in kodi:
play_item = xbmcgui.ListItem(path=url)
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem=play_item)
In kodi 17 the video is played normally but on kodi 16 I get the following error: 13:34:35 T:3968 WARNING: Attempt to use invalid handle -1
Does anyone know what I am doing wrong ?
Edit1: Ok I was able to find a solution in this thread: http://forum.kodi.tv/showthread.php?tid=257787
But I don't understand something, in logs I don't get any error when I am trying to play an Item in kodi 16 but the play won't start.
Edit2:
Ok I managed to find the exact problem but I don't have any ideea how can I solve it:
I have the following logic:
elif mode[0] == 'play':
xbmc_log(u'%s: %s' % ('Digi Storage Player', 'Url = '+args['foldername'][0]))
play_item = xbmcgui.ListItem(path=args['foldername'][0])
xbmcplugin.setResolvedUrl(addon_handle, True, listitem=play_item)
If I set the li.setProperty('IsPlayable', 'true') I get rid of invalid handle but the addon won't pass to the mode play.
I am running the following code to stream Video's in kodi:
play_item = xbmcgui.ListItem(path=url)
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem=play_item)
In kodi 17 the video is played normally but on kodi 16 I get the following error: 13:34:35 T:3968 WARNING: Attempt to use invalid handle -1
Does anyone know what I am doing wrong ?
Edit1: Ok I was able to find a solution in this thread: http://forum.kodi.tv/showthread.php?tid=257787
But I don't understand something, in logs I don't get any error when I am trying to play an Item in kodi 16 but the play won't start.
Edit2:
Ok I managed to find the exact problem but I don't have any ideea how can I solve it:
I have the following logic:
elif mode[0] == 'play':
xbmc_log(u'%s: %s' % ('Digi Storage Player', 'Url = '+args['foldername'][0]))
play_item = xbmcgui.ListItem(path=args['foldername'][0])
xbmcplugin.setResolvedUrl(addon_handle, True, listitem=play_item)
If I set the li.setProperty('IsPlayable', 'true') I get rid of invalid handle but the addon won't pass to the mode play.