SteamGridDB: Add timeout and retries to SteamGridDB Artwork Fetching #958
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.
Another bit for #933.
This adds a timeout for SteamGridDB, and a specific amount of retries. The default timeout is
15
seconds, and the maximum number of retries is set to5
.The reason for this is
wget
will retry for 600 seconds by default. It will also infinitely retry. In testing I found there are intermittent failures when fetching artwork from SteamGridDB, where it will just hang (possibly related to my internet connection?).A good use-case for this is when adding Non-Steam Games, even though you can Ctrl+C, this will end up corrupting the
shortcuts.vdf
and you will lose all your shortcuts. To prevent that case, and to hopefully retry and successfully download artwork, this change will allow for a timeout and retry. If wget fails after those 5 attempts it will move onto the next piece of artwork to download, or if it was the last artwork that it failed on, then it will just return and add the Steam shortcut as normal.If artwork fails, this PR will be especially useful once we can get AppIDs for Non-Steam Games. The user can see the artwork failed to download and they can retry on the AppID.
Shellcheck is green on this, but I want to do a little more testing before merging, probably tomorrow at this point.
TODO: