lekma / plugin.video.invidious

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

Channels not working with official docker images after 927c37ce3eb306fe6a02c0fdb9e3ee0a837e84d2 (01/2023) #77

Closed MusterGit closed 1 year ago

MusterGit commented 1 year ago

I am self-hosting an invidious instance using the official docker image. After version quay.io/invidious/invidious:927c37ce3eb306fe6a02c0fdb9e3ee0a837e84d2 from 2023-01-08 (latest working) the addon cannot show channels anymore.

The following error is thrown:

2023-02-19 13:12:53.133 T:15286   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'AttributeError'>
                                                   Error Contents: 'str' object has no attribute 'getItem'
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 218, in <module>
                                                       dispatch(*argv)
                                                     File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 214, in dispatch
                                                       InvidiousPlugin(url, int(handle)).dispatch(**parseQuery(query))
                                                     File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 26, in dispatch
                                                       super(InvidiousPlugin, self).dispatch(**kwargs)
                                                     File "/storage/.kodi/addons/script.module.iapc/lib/iapc/tools/plugin.py", line 66, in dispatch
                                                       return action(**kwargs)
                                                              ^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/script.module.iapc/lib/iapc/tools/plugin.py", line 33, in wrapper
                                                       raise error
                                                     File "/storage/.kodi/addons/script.module.iapc/lib/iapc/tools/plugin.py", line 30, in wrapper
                                                       success = func(self, **kwargs)
                                                                 ^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 94, in channel
                                                       return self.addDirectory(client.channel(**kwargs), "video", **kwargs)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.invidious/lib/plugin.py", line 66, in addDirectory
                                                       if super(InvidiousPlugin, self).addDirectory(items, *args):
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/script.module.iapc/lib/iapc/tools/plugin.py", line 98, in addDirectory
                                                       return self.addItems(items, *args, **kwargs)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/script.module.iapc/lib/iapc/tools/plugin.py", line 83, in addItems
                                                       self.__handle__, [item.asItem() for item in items if item]
                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/script.module.iapc/lib/iapc/tools/plugin.py", line 83, in <listcomp>
                                                       self.__handle__, [item.asItem() for item in items if item]
                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/script.module.iapc/lib/iapc/tools/objects.py", line 85, in <genexpr>
                                                       return (item.getItem(*args, **kwargs) for item in self if item)
                                                               ^^^^^^^^^^^^
                                                   AttributeError: 'str' object has no attribute 'getItem'
                                                   -->End of Python script error report<--

When I use an older docker image, the addon can show channels, but does not list all videos. Only the first page is shown.

TakTraum commented 1 year ago

I'm having the same issue. I wonder which version of the docker image is recommended for use with this Kodi addon.

bjoern-vh commented 1 year ago

Here the same. Not only self-hosted instances are affected, but also all public instances I tested. Since I actually only work through channels, the addon is unfortunately useless for me in its current state. I hope that this is not a major problem and there is a simple solution so that we can use this great addon again as usual :-)

MusterGit commented 1 year ago

Thanks for the fix, @lekma. I can confirm it's working now for me!

lekma commented 1 year ago

@MusterGit , @TakTraum , @bjoern-vh sorry for the delay, guys...

bjoern-vh commented 1 year ago

Thanks a lot. Works like a charm :-)