Stop playback process before setting setRsolvedUrl?
#1
Hi,
i was wondering if there was any way to stop the playback process if it has been started?
In my addon i add blog posts as listitems to the container (folder = false), those call another function which resolves the true url of the embedded
video in the post. If it succceeds it will teturn the correct video url (or plugin url for something like youtube or vimeo) using xbmcplugin.SetResolvedURL.
This standard procedure as far as i know...
This works great as expected but is there a way to cleanly stop the playback process?

If my function cant find a correct video url in the blog post it wont set setResolvedURL, but kodi still tries to playback the listitem which results in an error of course.
I want to get rid of this error because i implemented my own notification informing the user that no embedded video was found and it will display the blog posts text to the user instead.
If more than one video is found my addon display a selection list to the user, where he/she can choose which video to play.
If this dialog is canceled, kodi also returns an error of unplayable item.

So i need a way to tell kodi to stop the playback process, any ideas?

If necessary i will provide short code example but i think its clear what i meant.
Thanks
Reply
#2
You need to do something like this to indicate failure, at least that's what I've been doing. However I'm not 100% certain it prevents the popup message from Kodi:

xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xbmcgui.ListItem())
Reply
#3
thanks for the tip but sadly this wont stop kodi from trying to playback something...
Code:
CDVDPlayer::OpenInputStream - error opening [None]
and displaying a error from time to time that some items didnt playback.
Reply

Logout Mark Read Team Forum Stats Members Help
Stop playback process before setting setRsolvedUrl?0