Skip to content

Commit e0282dd

Browse files
committed
xbmc.translatePath -> xbmcvfs.translatePath
1 parent 6082943 commit e0282dd

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

resources/arts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import xbmc
21
import xbmcaddon
2+
import xbmcvfs
33

44
import os
55
from datetime import timedelta
@@ -13,8 +13,8 @@
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'))
17-
ART_AVAILABILITY_CACHE_FILE = xbmc.translatePath(os.path.join(addonUserDataFolder, 'requests_cache_arts'))
16+
addonUserDataFolder = xbmcvfs.translatePath(__addon__.getAddonInfo('profile'))
17+
ART_AVAILABILITY_CACHE_FILE = xbmcvfs.translatePath(os.path.join(addonUserDataFolder, 'requests_cache_arts'))
1818

1919
cached_requests = requests_cache.core.CachedSession(ART_AVAILABILITY_CACHE_FILE, backend='sqlite',
2020
expire_after= timedelta(weeks=4*monthsBeforeArtsExpiration),

resources/steam.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import shlex
44
import subprocess
55

6-
import xbmc
76
import xbmcaddon
87
import xbmcplugin
8+
import xbmcvfs
99

1010
import requests
1111
import requests_cache
@@ -16,8 +16,8 @@
1616
minutesBeforeGamesListsExpiration = int(__addon__.getSetting("games-expire-after-minutes")) # Default is 3 days
1717

1818
# define the cache file to reside in the ..\Kodi\userdata\addon_data\(your addon)
19-
addonUserDataFolder = xbmc.translatePath(__addon__.getAddonInfo('profile'))
20-
STEAM_GAMES_CACHE_FILE = xbmc.translatePath(os.path.join(addonUserDataFolder, 'requests_cache_games'))
19+
addonUserDataFolder = xbmcvfs.translatePath(__addon__.getAddonInfo('profile'))
20+
STEAM_GAMES_CACHE_FILE = xbmcvfs.translatePath(os.path.join(addonUserDataFolder, 'requests_cache_games'))
2121

2222
# cache expires after: 86400=1 day 604800=7 days
2323
cached_requests = requests_cache.CachedSession(STEAM_GAMES_CACHE_FILE, backend='sqlite',
@@ -120,4 +120,4 @@ def delete_cache():
120120
log('Failed to delete & recreate cache')
121121
cached_requests.cache.responses = requests_cache.backends.storage.dbdict.DbPickleDict(STEAM_GAMES_CACHE_FILE + ".sqlite", 'responses', fast_save=True)
122122
cached_requests.cache.keys_map = requests_cache.backends.storage.dbdict.DbDict(STEAM_GAMES_CACHE_FILE + ".sqlite", 'urls')
123-
123+

0 commit comments

Comments
 (0)