Skip to content

Conversation

@AmineI
Copy link
Collaborator

@AmineI AmineI commented May 6, 2020

By caching the Steam API calls & responses, and using cached responses on network errors, this enables offline support if a folder was already opened online once before.

The cached responses are used instead of the network calls, until they expire (3 days by default). unless there was a network error, in which case we use the cached responses regardless of their expiration.

This uses the module requests-cache

Along with the art lists caching mechanism (which caches the urls of available arts), Kodi's own cache (which caches the arts and items themselves), this should be good to go for full offline support.

AmineI added 4 commits May 6, 2020 05:46
…team API calls & responses).

Along with the art caching mechanism, this should enable offline support for the addon if a folder was already opened online once before.
@AmineI
Copy link
Collaborator Author

AmineI commented May 6, 2020

I tried to make this PR stand alone (by not depending on #20 in case it's not merged), so it will likely have merge conflicts if #20 is merged - due to :

  • settings.xml's "delete-cache" which I added to both
  • addon.xml's dependency on requests-cache which I added to both
  • main.py's "delete_cache()" which was defined in both

I'll monitor that and fix conflicts accordingly in case you want approve both PRs Conflicts resolved, ready to merge !

@aanderse aanderse merged commit 63387a8 into aanderse:master May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants