RunPlugin called from context menu always has handle -1
#1
I have bunch of context menu items which call RunPlugin() to execute some code in same plugin but no matter what path is called there is always handle with value of -1. It bothers me mainly because if I have context menu item which should start Kodi player I cannot use:

xbmcplugin.setResolvedUrl(handle, success, li):

and only way to play it is using this method instead:

xbmc.Player().play(filename, li):

Which would be fine but it causes an issue with Kodi not tracking watch progress. But maybe I am wrong and there is other reason why progress is not tracked.
Reply
#2
How do I edit posts?

I meant to show this:

Cannot use this with handle -1:
python:
xbmcplugin.setResolvedUrl(handle, success, li)
Have to use this instead:
python:
xbmc.Player().play(filename, item)
 
Which causes issue with progress tracking.
Reply
#3
You should use XBMC.Player().play() but pointing to your plugin:// path
Reply

Logout Mark Read Team Forum Stats Members Help
RunPlugin called from context menu always has handle -10