lekma / plugin.video.invidious

Invidious Addon for Kodi
GNU General Public License v3.0
50 stars 7 forks source link

Today's upgrade of script.module.iapc broke invidious completely #46

Closed pitsi closed 3 years ago

pitsi commented 3 years ago

As mentioned in the title, updating script.module.iapc to v0.2.0 made invidious unusable. When kodi starts, a notification pops up that invidious has crashed and the log mentions

2020-12-30 17:16:56.456 T:139963488253696   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: cannot import name JSONRPCError
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/service.py", line 15, in <module>
                                                from script import _clearSearchHistory
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/script.py", line 13, in <module>
                                                from iapc import JSONRPCError
                                            ImportError: cannot import name JSONRPCError
                                            -->End of Python script error report<--

Also, when a search is done, the "busy" animation stays up for way too long and when it is done or cancelled this comes up in the log

2020-12-30 17:23:51.748 T:139631916189440   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'iapc.json_service.RequestError'>
                                            Error Contents: remote traceback: unknown error
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 229, in <module>
                                                dispatch(*sys.argv)
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 224, in dispatch
                                                Dispatcher(url, int(handle)).dispatch(**parseQuery(query))
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 218, in dispatch
                                                return action(**kwargs)
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 32, in wrapper
                                                success = func(self, **kwargs)
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 206, in search
                                                return self._search(q, **kwargs)
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 172, in _search
                                                client.search(q, **kwargs), kwargs["type"], q=q, **kwargs)
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/client.py", line 125, in search
                                                self.query_("search", q=q, page=page, **kwargs), limit=limit)
                                              File "/storage/.kodi/addons/plugin.video.invidious/lib/client.py", line 41, in query_
                                                return self.client.query(key, *args, **kwargs) or self._defaults_.get(key, [])
                                              File "/storage/.kodi/addons/script.module.iapc/lib/iapc/json_service.py", line 174, in __call__
                                                return Request(self.sender).execute((self.name, args, kwargs))
                                              File "/storage/.kodi/addons/script.module.iapc/lib/iapc/json_service.py", line 153, in execute
                                                raise self.response
                                            RequestError: remote traceback: unknown error
                                            -->End of Python script error report<--

Downgrading script.module.iapc broke to v0.1.0 makes the first error go away, but search remains broken. Kodi 18.9 on libreelec x64 9.2.6 (as seen in the logs above) and on debian testing x64, invidious 0.2.6-c1d590 and kavin.rocks as the instance. Truth is I had not opened invidious since last week, so the search may have been broken already all that time.

Thank you in advance and have a happy new year :)

lekma commented 3 years ago

I apologize for that, I meant to release 0.5.0 with the new iapc but something came up (wife called for dinner), and then I wanted to fix autogenerated channels and it took more time than I would have like it to take. :(

Anyway, I think I'll release 0.5.0 today (in its current slightly buggy state).

As for the search, it is entirely dependent on the instance you're using. In the log you should find (or you will when 0.5.0 is out the door) a line similar to:

request.url: https://invidious.snopyta.org/api/v1/search?q=kiki&type=video&page=1

You can copy this url into a browser and see what's happening there.

thanks for your patience and your well wishes, and a happy new year :)

pitsi commented 3 years ago

I noticed 0.5.0 a few hours ago, but it is not in the repo yet. I will check it again now.

lekma commented 3 years ago

i pushed it a couple of minutes ago.

lekma commented 3 years ago

also this new version doesn't require the youtube plugin anymore to play videos directly from youtube, so you should be able to remove it if you don't need it anymore.

but as always there might be bugs, so if you encounter videos that you cannot play even from youtube please report the video ids and I'll try to find out what's happening...

pitsi commented 3 years ago

Everything is back to normal now! I will keep that tip for the searches handy. Thank you very very much. Have a nice 2021!

As for the videos, I just noticed that music videoclips play at 720p in invidious, while on youtube they are limited to 360p, because of this https://github.com/jdf76/plugin.video.youtube/issues/440