From 9889f3d2870476a5be81467d4c469c5ef41caa52 Mon Sep 17 00:00:00 2001 From: David <76606239+Brompton5007@users.noreply.github.com> Date: Sun, 14 Aug 2022 08:54:40 +0930 Subject: [PATCH] Update helper.py After installing the add-on script Metadata Editor version 3.0.1 from the Kodi.tv repo v20. The error message that: module 'xmbc' has no attribute 'translate Path'. and that if ignored it may lead to memory leaks. In Python API v20 : { translatePath, "", xbmc.translatePath() function was removed completely. Use xbmcvfs.translatePath(). After making this change no longer receiving error messages. --- resources/lib/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/helper.py b/resources/lib/helper.py index 99e8ee1..8a1b7d7 100644 --- a/resources/lib/helper.py +++ b/resources/lib/helper.py @@ -24,7 +24,7 @@ ADDON = xbmcaddon.Addon() ADDON_ID = ADDON.getAddonInfo('id') -ADDON_DATA_PATH = os.path.join(xbmc.translatePath("special://profile/addon_data/%s" % ADDON_ID)) +ADDON_DATA_PATH = os.path.join(xbmcvfs.translatePath("special://profile/addon_data/%s" % ADDON_ID)) NOTICE = xbmc.LOGINFO WARNING = xbmc.LOGWARNING @@ -247,4 +247,4 @@ def busy_dialog(force=False): finally: execute('CancelAlarm(BusyAlarmDelay,silent)') - execute('Dialog.Close(busydialognocancel)') \ No newline at end of file + execute('Dialog.Close(busydialognocancel)')