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

Error when search results are nothing #68

Closed mirh closed 1 month ago

mirh commented 4 months ago

If you search "naruto" everything is fine and dandy, if you search "adfsdfasdf" a fully fledged addon error comes out:

2024-05-17 14:41:59.693 T:21708   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'IndexError'>
                                                   Error Contents: list index out of range
                                                   Traceback (most recent call last):
                                                     File "...\Kodi\addons\plugin.video.crunchyroll\default.py", line 36, in <module>
                                                       crunchyroll.main(sys.argv)
                                                     File "...\Kodi\addons\plugin.video.crunchyroll\resources\lib\crunchyroll.py", line 97, in main
                                                       return check_mode()
                                                     File "...\Kodi\addons\plugin.video.crunchyroll\resources\lib\crunchyroll.py", line 130, in check_mode
                                                       controller.search_anime()
                                                     File "...\Kodi\addons\plugin.video.crunchyroll\resources\lib\controller.py", line 134, in search_anime
                                                       type_data = req.get('items')[0]  # @todo: for now we support only the first type, which should be series
                                                   IndexError: list index out of range
                                                   -->End of Python script error report<--
smirgol commented 4 months ago

Well, you searched for garbage and got garbage as the result, looks fine to me :) jk, will fix that with the next update

smirgol commented 1 month ago

Took a while, sorry for that, but this is now fixed.

mirh commented 1 month ago

Sigh, too bad I'm really fucking pissed at them now.