TheAssassin / kodi-invidious-plugin

Invidious plugin for Kodi. A privacy-friendly way of viewing YouTube videos, built using the awesome Invidious service's API.
MIT License
50 stars 16 forks source link

does/should it work with python <3.8? #18

Closed DJCrashdummy closed 2 years ago

DJCrashdummy commented 2 years ago

beforehand: i'm not sure where this issue fits the best (here or at @lekma's fork or perhaps even at his addon repo), so please bear with me.


i'm using the latest OSMC (2022.03-1) which uses Kodi 19.4 and is based on Debian 10 Buster. the addon from the official repo (0.1.0+matrix.1) can be installed, but if i try to send any request to the chosen invidious instance - no mater which one - i get a 403 response.
because it seems a little bit outdated, i activated/installed @lekma's addon repo, installed it's latest version (1.0.10), but then i just get an error notification to look at the logs for further information... the things about invidious:

2022-09-14 13:54:25.376 T:626      INFO <general>: CAddonMgr::FindAddon: plugin.video.invidious v1.0.10 installed
2022-09-14 13:54:26.178 T:635      INFO <general>: initializing python engine.
2022-09-14 13:54:26.339 T:547   WARNING <general>: CGUIMediaWindow::OnMessage - updating in progress
2022-09-14 13:54:27.424 T:635     ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'SyntaxError'>
                                                   Error Contents: invalid syntax (service.py, line 61)
                                                     File "/home/osmc/.kodi/addons/plugin.video.invidious/lib/service.py", line 61
                                                       if (timeout := getSetting("timeout", float)) <= 0.0:
                                                                   ^
                                                   SyntaxError: invalid syntax
                                                   -->End of Python script error report<--

2022-09-14 13:54:28.093 T:635      INFO <general>: Python interpreter stopped
2022-09-14 13:54:34.525 T:547     ERROR <general>: AddonVersion: 0.1.0 matrix.1 is not a valid version
2022-09-14 13:54:57.629 T:547      INFO <general>: Stopping player
2022-09-14 13:54:57.725 T:580      INFO <general>: CZeroconfAvahi::clientCallback: client failure. avahi-daemon stopped? Recreating client...
2022-09-14 13:54:58.353 T:547      INFO <general>: Stopping all
2022-09-14 13:54:58.353 T:547      INFO <general>: ES: Stopping event server
2022-09-14 13:54:58.353 T:547      INFO <general>: stopping zeroconf publishing
2022-09-14 13:54:58.365 T:580      INFO <general>: CZeroconfAvahi::clientCallback: avahi server not available. But may become later...
2022-09-14 13:54:58.377 T:547      INFO <CWebserver[80]>: Stopped
2022-09-14 13:54:58.457 T:581      INFO <general>: ES: UDP Event server stopped
2022-09-14 13:54:58.462 T:547      INFO <general>: stop dvd detect media
2022-09-14 13:54:58.464 T:547      INFO <general>: CServiceAddonManager: failed to stop plugin.video.invidious (may have ended)

unfortunately i'm not a dev, but my uneducated guess is that this addon - at least all version in @lekma's addon repo - uses/assumes python 3.8 but Debian Buster provides only python 3.7 (3.7.3-1 in my case to be precise).

if i'm correct, is there any chance to get this addon working with python <3.8 (with reasonable effort)? or is there a way to install the needed dependencies resp. check them beforehand and avoid installing/updating if they are not met?

TheAssassin commented 2 years ago

Your guess is right. This is some new Python 3.8 syntax which I hadn't ever seen before this issue. The specification is in https://peps.python.org/pep-0572/.

This is the wrong repository, though. The file layout (service.py) suggests you need to look for some other repository.

DJCrashdummy commented 2 years ago

thanks for the quick reply @TheAssassin! sorry for bothering you with this... somehow i thought this two projects are closer related. :facepalm: my bad!

DJCrashdummy commented 2 years ago

but still the 403 error (with the version from the official repo) persists... is there a chance to get the official repo updated?