smirgol / plugin.video.crunchyroll

Watch videos from the anime platform Crunchyroll.com on Kodi
GNU Affero General Public License v3.0
49 stars 10 forks source link

Fixed a race condition on playback start. #66

Closed xLAva closed 4 months ago

xLAva commented 4 months ago

With certain options, the start_playback returns before the is_playback returns true, which makes the controller to stop the video playback before it even has started. It could be that this is a new issue on Kodi Omega, since I did not encounter it before updating.

Fix: wait for the is_playback to be true before exiting start_playback (with a timeout)

smirgol commented 4 months ago

That's interesting. I wonder if that is also the fix for the very random playback issues I'm experiencing (inputstreamhelper fails to retrieve manifest), where the video just won't start and error out and which usually needs a reboot to fix.

I remember there was a similar check in earlier versions, which I removed because I thought it should be obsolete. Looks like it isn't.

Thank you for the PR, looks good to me, so merged. :)