Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdm_path = translate_path(to_unicode(addon.getSetting('DECRYPTERPATH'))) in widevine.py leads to empty path and error #585

Open
BarkVeryLittle opened this issue Dec 28, 2024 · 0 comments

Comments

@BarkVeryLittle
Copy link

BarkVeryLittle commented Dec 28, 2024

Hi

I am running LibreElec 12.0.1. on a Raspberry Pi 4. When trying to install widevine via inputstreamhelper I got the following error and widevine was not installed:

2024-12-27 23:50:45.495 T:1706  warning <general>: [script.module.inputstreamhelper] Recursively create directory ''.
2024-12-27 23:50:45.497 T:1706     info <general>: Skipped 1 duplicate messages..
2024-12-27 23:50:45.497 T:1706    error <general>: [script.module.inputstreamhelper] Widevine CDM is not installed.
2024-12-27 23:50:45.499 T:1706  warning <general>: [script.module.inputstreamhelper] Recursively create directory ''.
2024-12-27 23:50:45.510 T:1706    error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'FileNotFoundError'>
Error Contents: [Errno 2] No such file or directory: ''
Traceback (most recent call last):
File "/storage/.kodi/addons/script.module.inputstreamhelper/default.py", line 8, in <module>run(sys.argv)
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/api.py", line 15, in run widevine_install(choose_version=params[2])
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/api.py", line 48, in widevine_install Helper('mpd', drm='widevine').install_widevine(choose_version=choose_version)
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/__init__.py", line 38, in clean_before_after self.cleanup()
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/__init__.py", line 388, in cleanup
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/utils.py", line 360, in remove_tree rmtree(compat_path(path))
File "/usr/lib/python3.11/shutil.py", line 742, in rmtree
File "/usr/lib/python3.11/shutil.py", line 740, in rmtree
FileNotFoundError: [Errno 2] No such file or directory: ''
-->End of Python script error report<--

I figured out that replacing
cdm_path = `translate_path(to_unicode(addon.getSetting('DECRYPTERPATH')))
in line 120 in widevine.py with
cdm_path = translate_path(os.path.join('special://home/', 'cdm'))

resolved the issue.

Prior to this I already copied <setting id="DECRYPTERPATH" default="true">special://storage/.kodi/cdm/</setting> from .kodi/userdata/addon_data/inputstream.adaptive/settings.xml to .kodi/userdata/addon_data/script.module.inputstreamhelper/settings.xml yet that didn't help.

To be honest I don't know, if my solution is ideal (yet the DAZN plug I initially tried to get to work still doesn't work), but since I did not find anything about this, I though I might share this. Maybe it helps anybody or you get any insights from this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant