From 93fc9caf5726cbc77301f64a3acaf1ce242963df Mon Sep 17 00:00:00 2001 From: eble_lars Date: Fri, 4 Nov 2022 11:14:03 +0100 Subject: [PATCH] Decreased strictness of asset download verification. May help #202 --- LeagueBroadcast/Common/Data/Provider/DataDragon.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/LeagueBroadcast/Common/Data/Provider/DataDragon.cs b/LeagueBroadcast/Common/Data/Provider/DataDragon.cs index 6e5fdaa..0df2300 100644 --- a/LeagueBroadcast/Common/Data/Provider/DataDragon.cs +++ b/LeagueBroadcast/Common/Data/Provider/DataDragon.cs @@ -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); } @@ -247,7 +252,7 @@ private static async Task 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) { @@ -255,12 +260,9 @@ private static async Task VerifyLocalCache(StringVersion currentPatch) 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");