Skip to content

Commit 502b92d

Browse files
authored
Merge pull request #35 from aanderse/kodi-fix
bump to version 0.9.0
2 parents 6082943 + bebbc96 commit 502b92d

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

addon.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="plugin.program.steam.library" name="Steam Library" version="0.8.1" provider-name="aanderse">
2+
<addon id="plugin.program.steam.library" name="Steam Library" version="0.9.0" provider-name="aanderse">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0" />
55
<import addon="script.module.requests" version="2.22.0" />
@@ -45,6 +45,8 @@
4545
- Offline support of the game lists, with a caching mechanism of the Steam API responses
4646
v0.8.0 (2021-03-12)
4747
- ported to kodi 19.x
48+
v0.9.0 (2023-06-05)
49+
- ported to kodi 20.x
4850
</news>
4951
<assets>
5052
<icon>icon.png</icon>

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)