From 53e40a77dcb3870d74dd616ce4c29a33ada29106 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jan 2018 13:25:49 +0900 Subject: [PATCH] Don't show error messages when a download is user-cancelled Resolves #1941. --- osu.Game/Beatmaps/BeatmapManager.cs | 6 ++++-- osu.Game/Overlays/Direct/DirectPanel.cs | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index 634b5bcd20..fa20f779a4 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -292,10 +292,12 @@ namespace osu.Game.Beatmaps currentDownloads.Remove(request); }; - request.Failure += data => + request.Failure += error => { + if (error is OperationCanceledException) return; + downloadNotification.State = ProgressNotificationState.Completed; - Logger.Error(data, "Failed to get beatmap download information"); + Logger.Error(error, "Beatmap download failed!"); currentDownloads.Remove(request); }; diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 7dd6be8dc6..64a36f5671 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -180,7 +180,6 @@ namespace osu.Game.Overlays.Direct { progressBar.Current.Value = 0; progressBar.FadeOut(500); - Logger.Error(e, "Failed to get beatmap download information"); }; request.DownloadProgressed += progress => progressBar.Current.Value = progress;