i96751414 / plugin.video.torrest

Torrest plugin for Kodi
MIT License
27 stars 6 forks source link

xbmc.translatePath has been removed #35

Closed pablomuri closed 7 months ago

pablomuri commented 7 months ago

Hello I am getting this error when the plugin is loaded:

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: module 'xbmc' has no attribute 'translatePath'
                                                   Traceback (most recent call last):
                                                     File "/Users/pablomuri/Library/Application Support/Kodi/addons/plugin.video.torrest/service.py", line 3, in <module>
                                                       from lib.kodi import ADDON_DATA
                                                     File "/Users/pablomuri/Library/Application Support/Kodi/addons/plugin.video.torrest/lib/kodi.py", line 21, in <module>
                                                       ADDON_DATA = assure_unicode(xbmc.translatePath(ADDON.getAddonInfo("profile")))
                                                                                   ^^^^^^^^^^^^^^^^^^
                                                   AttributeError: module 'xbmc' has no attribute 'translatePath'
                                                   -->End of Python script error report<--

It seems that the translatePath method was finally removed after having been reprecated.

Thanks!

i96751414 commented 7 months ago

Hi. I am not sure what version you are using. The latest version already supports Kodi 20+:

https://github.com/i96751414/plugin.video.torrest/blob/93055e6691dd15974992fe958f007c6757dd5501/lib/kodi.py#L13-L27

pablomuri commented 7 months ago

Yeah sorry, I was using the v0.0.12. Thank you for your time!