pannal / plex-for-kodi

Unoffical Plex for Kodi add-on releases.
GNU General Public License v2.0
237 stars 30 forks source link

Does not work with Kodi debian package #82

Closed JoeJoeTV closed 5 months ago

JoeJoeTV commented 5 months ago

Description:

The addon will not start on kodi installed from the debian repo, as the split of the version string assumes there are only numbers present.

Details:

Log:

2024-01-14 17:20:14.139 T:9623    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'ValueError'>
                                                   Error Contents: invalid literal for int() with base 10: '4 Debian package version: 2:19'
                                                   Traceback (most recent call last):
                                                     File "/home/joejoetv/.kodi/addons/script.plexmod/default.py", line 2, in <module>
                                                       from lib import main
                                                     File "/home/joejoetv/.kodi/addons/script.plexmod/lib/main.py", line 13, in <module>
                                                       from . import plex
                                                     File "/home/joejoetv/.kodi/addons/script.plexmod/lib/plex.py", line 16, in <module>
                                                       from .playback_utils import PlaybackManager
                                                     File "/home/joejoetv/.kodi/addons/script.plexmod/lib/playback_utils.py", line 9, in <module>
                                                       from lib import util
                                                     File "/home/joejoetv/.kodi/addons/script.plexmod/lib/util.py", line 45, in <module>
                                                       int(_splitver[1].split("-")[0].strip())
                                                   ValueError: invalid literal for int() with base 10: '4 Debian package version: 2:19'
                                                   -->End of Python script error report<--

Checklist

pannal commented 5 months ago

Oh interesting. Can you post your full version string and/or a screenshot of your version info view?

JoeJoeTV commented 5 months ago

This is what the log file gave me:

2024-01-14 16:28:14.706 T:7566     INFO <general>: Starting Kodi from Debian (19.4 Debian package version: 2:19.4+dfsg1-2). Platform: Linux ARM 64-bit

Here is a screenshot of the Version Info screen in Kodi (It's in german, but from your profile I see that that shouldn't be a problem :) ): screenshot

pannal commented 5 months ago

This should fix your issue, please confirm: script.plexmod.zip

JoeJoeTV commented 5 months ago

Ok, that solves the issue of the addon not starting, but I am now encountering another issue, where Kodi freezes as a whole on the loading screen while opening an episode of a series. SHould I create a new issue for that?

pannal commented 5 months ago

Hmm, if you have any logs before the crash, you can put them here. I doubt that I can do much, though, as we're simply using the Kodi Player engine and don't have control over what it does. We hand off the stream URL and it does its thing. This might be an issue with the debian build.

JoeJoeTV commented 5 months ago

I have looked at the logs and it doesn't seem like Kodi is crashing, because when I press anything, something gets appended to the log, but still, nothing changes and I have to kill the Kodi process. I will check when I get home, if I can play media via the Composite extension, since that also uses the Kodi player AFAIK.

pannal commented 5 months ago

Logs would definitely be helpful. This happens when you try to play something, yes? Does the PM4K player UI load? (It sits on top of the native Kodi player UI)

JoeJoeTV commented 5 months ago

I will send logs when I get home. Do you mean the player UI? Then no, I only see the background image that is also displayed while loading and a Kodi loading animation until it disappears and freezes.

JoeJoeTV commented 5 months ago

Ok, it seems like it's an issue unrelated to this, even though I got a video without sound to kind off work with the Composite Kodi plugin. It has something to do with hardware acceleration: https://github.com/xbmc/xbmc/issues/23867

pannal commented 5 months ago

I hope you can get that sorted. I'm a little glad we don't have a bigger incompatibility with the addon (would've baffled me as we've got hundreds of installs all over different systems and Kodi versions). You can still post the debug log if you want and I can take a look.

JoeJoeTV commented 5 months ago

Ok, I have enabled debug logging and performed the following steps for both running Kodi standalone directly from the login manager and from the desktop ubuntu session:

  1. Open Kodi
  2. Open the Plex4Kodi Addon
  3. Select one of the last watched Episodes I watched
  4. Press Play
  5. Skip a bit around in the video
  6. Try to stop the video to get back to the previous screen

Notes:

Below I have attached the log I captured (I removed some identifying information, but I hope it's enough): kodi_sanitized.log

JoeJoeTV commented 5 months ago

Also to add to this, the following is output when running kodi from the terminal and was confirmed to me by the one that modifed the ffmpeg library to run on this hardware to be part of the problem:

failed to open zone.tab
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/aarch64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
sh: 1: nmblookup: not found
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
reference in DPB was never decoded
terminate called after throwing an instance of 'fmt::v8::format_error'
  what():  string pointer is null