Mod Cancel setResolvedUrl
#1
Hi,

is any way to cancel setResolvedUrl() without a notification about play failed?

When Kodi as my plugin about URL I ask the user if he wants to buy VoD. If he press NO then I set setResolvedUrl(handle, False).
The notification is not necessary, user abort access to the video himself.

How to disable the notification?

Regards,
rysson
Reply
#2
I don't think you can bypass the playback failed notification unless you play *something*  I got around this with an addon I wrote by including a very short mp4 file that is just a black screen.  When I need to get out of things without the playback failed notification, I play that little mp4.  To the user the screen goes black for like 3 seconds (you could probably get away with something shorter) and then returns to the GUI.

https://github.com/pkscout/plugin.wherea...you.py#L66

(in case the link doesn't take you to the exact line, look the stuff starting at line 66)
Reply
#3
Thanks for quick answer.

I've tried the same, even with empty m3u8 playlist to avoid blinking but I have a problem with watched mark.
If the video has process set, playing something short marks as watched.
How do you handle it?
Reply
#4
(Yesterday, 10:39)rysson Wrote: Thanks for quick answer.

I've tried the same, even with empty m3u8 playlist to avoid blinking but I have a problem with watched mark.
If the video has process set, playing something short marks as watched.
How do you handle it?
Oddly, I've not had that issue.  My addon is really kind of hijacking the playback mechanism to let you use .disc files as placeholders that generates a dialog box telling you what streaming service it's available on (or a strm file with a URL that I can process via Home Assistant - that's a longer story).  I didn't do anything special to keep the watched mark from getting enabled.
Reply
#5
OK, a have made more tests.
It looks Kodi try to rewind to resume point. If black.mp4 (or m3u list) is shorter, Kodi marks the video as watched.
If black.mp4 is longer, just starts playing. 

If I stop playing just after setResolvedUrl() it blinks black frame (not always) and stops. And does NOT change the resume point!

In this way I can say that problem is solved.
Thanks for your help.
Reply

Logout Mark Read Team Forum Stats Members Help
Cancel setResolvedUrl0