File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" />
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 >
Original file line number Diff line number Diff line change 1- import xbmc
21import xbmcaddon
2+ import xbmcvfs
33
44import os
55from datetime import timedelta
1313monthsBeforeArtsExpiration = 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
1919cached_requests = requests_cache .core .CachedSession (ART_AVAILABILITY_CACHE_FILE , backend = 'sqlite' ,
2020 expire_after = timedelta (weeks = 4 * monthsBeforeArtsExpiration ),
Original file line number Diff line number Diff line change 33import shlex
44import subprocess
55
6- import xbmc
76import xbmcaddon
87import xbmcplugin
8+ import xbmcvfs
99
1010import requests
1111import requests_cache
1616minutesBeforeGamesListsExpiration = 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
2323cached_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+
You can’t perform that action at this time.
0 commit comments