smirgol/plugin.video.crunchyroll

Error when search results are nothing

Closed this issue · 3 comments

mirh commented

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<--
                                                   

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

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

mirh commented

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