Closed Yavos closed 8 months ago
Hm, that's interesting. :) Thank you for providing a solution to this, too. I think I can add that in the next update.
Should be fixed in the staging branches. If you could test that and report back, that'd be great! :)
With the current version kodi crashes whenever it calls asyncio.run() a second time. Moving the code to view.py resolves that apparently.
I presume this is because if initialized in view.py it's a new session every time. My guess is that .run() is not the correct function to use multiple times in a single session.
Ah, it was you who had this problem, that explains the crashes you had in the other issue :D
I thought it might be a good idea to have it in the main file, so it would affect the whole app, but apparently that doesn't work. Where do you move that call to inside the view.py precisely? Just at the top of the file, after the imports?
Yup, just at the top after the imports.
There might be a more clean way to do this with global initialization. But I don't know enough about that. (Also the app crashed without any errors right after calling .run(). So it was hard to figure out what happened.)
I've added it to the default.py
to make it globally available, as this is the main function for the app. Not sure why this does not work. Did you reboot your system after updating the plugin? I've noticed that Kodi somehow seems to "cache" this file, so any changes to it are effective only after a reboot.
Nope. Didn't reboot. Just restart Kodi itself. I'll try your suggestion later and report back if it worked.
I'm sure the change was working, though. Since the first asyncio.run() works without failure which it doesn't on my system if that fix is not applied at all.
Same problem after reboot. First .run() works, second call of it crashes Kodi without any logging.
Hm okay. I've moved it to view.py
now.
With the changes up to current commit 60684a7 everything seems to be working fine.
With the current version of the plugin on Windows, Nexus I get the following error whenever it tries to load something from crunchyroll:
Supposedly according to the internet that's a python error on windows fixed in 3.8.2 (mine is running 3.8.15 though).
Adding
to
view.py
seems to have solved that problem for me. Not sure if it's necessary to add invideostream.py
as well but so far it seems to work properly.