Skip to content

Commit

Permalink
Decreased strictness of asset download verification. May help #202
Browse files Browse the repository at this point in the history
  • Loading branch information
floh22 committed Nov 4, 2022
1 parent f264f73 commit 93fc9ca
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions LeagueBroadcast/Common/Data/Provider/DataDragon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ private static async Task Init()

bool result = await VerifyLocalCache(version.localVersion);

if(!result)
{
Log.Warn("[CDrag] Some downloads failed. Not all assets may be available");
}

FinishLoading?.Invoke(null, EventArgs.Empty);
}

Expand Down Expand Up @@ -247,20 +252,17 @@ private static async Task<bool> VerifyLocalCache(StringVersion currentPatch)
DownloadMissingSummonerSpellCache(spell, failedDownloads);

s.Stop();
$"[CDrag] Verified local cache in {s.ElapsedMilliseconds}ms".Debug();
Log.Info($"[CDrag] Verified local cache in {s.ElapsedMilliseconds}ms");

if (_toDownload == toCache)
{
Log.Info("Local cache up to date");
return true;
}

Log.Info($"[CDrag] Downloaded {_toDownload} assets from CommunityDragon");
Log.Info($"[CDrag] Downloaded {_downloaded} assets from CommunityDragon");

if (_downloaded == _toDownload)
{
_ = _downloadComplete.TrySetResult(failedDownloads.IsEmpty);
}
_ = _downloadComplete.TrySetResult(failedDownloads.IsEmpty);

bool updateResult = await _downloadComplete.Task;
Log.Info($"[CDrag] Downloaded missing assets");
Expand Down

0 comments on commit 93fc9ca

Please sign in to comment.