Keep infra-dns.json updated from metadata.ppsspp.org #19913
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds basic file caching support to the download manager.
Now updates it dynamically from
http://metadata.ppsspp.org/infra-dns.json
(I do need to remember to keep it up to date now when making changes...).If the download fails (server down or something) fallbacks first to cache, then to the supplied file in /assets.
Cache expires after 24h (but as mentioned, will still be used if the download fails).
The file is fetched during apctl init, hopefully early enough. Would be interesting to see if some game breaks, if so we can fetch also from sceUtility if a game tries to fetch DNS from there first...