Skip to content

Commit 6776ce1

Browse files
committed
Changed to the recommended way to get the addon user data folder
as described here https://kodi.wiki/view/Add-on_rules
1 parent 719e26f commit 6776ce1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

resources/arts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
monthsBeforeArtsExpiration = int(__addon__.getSetting("arts-expire-after-months")) # Default is 2 months
1414

1515
# define the cache file to reside in the ..\Kodi\userdata\addon_data\(your addon)
16-
addonUserDataFolder = xbmc.translatePath(__addon__.getAddonInfo('profile'))
16+
addonUserDataFolder = xbmc.translatePath(__addon__.getAddonInfo('profile')).decode('utf-8')
1717
ART_AVAILABILITY_CACHE_FILE = xbmc.translatePath(os.path.join(addonUserDataFolder, 'requests_cache_arts'))
1818

1919
cached_requests = requests_cache.core.CachedSession(ART_AVAILABILITY_CACHE_FILE, backend='sqlite',

resources/steam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
__addon__ = xbmcaddon.Addon()
1616
# define the cache file to reside in the ..\Kodi\userdata\addon_data\(your addon)
17-
addonUserDataFolder = xbmc.translatePath(__addon__.getAddonInfo('profile'))
17+
addonUserDataFolder = xbmc.translatePath(__addon__.getAddonInfo('profile')).decode('utf-8')
1818
STEAM_GAMES_CACHE_FILE = xbmc.translatePath(os.path.join(addonUserDataFolder, 'requests_cache_games'))
1919
minutesBeforeGamesListsExpiration = int(xbmcplugin.getSetting(int(sys.argv[1]), "games-expire-after-minutes")) # Default is 3 days
2020

0 commit comments

Comments
 (0)