From 53e40a77dcb3870d74dd616ce4c29a33ada29106 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jan 2018 13:25:49 +0900 Subject: [PATCH 1/2] 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; From 3d4e2d400cd9896803a2dbf0ce31f928f40b20a6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jan 2018 13:52:10 +0900 Subject: [PATCH 2/2] Remove unused using --- osu.Game/Overlays/Direct/DirectPanel.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 64a36f5671..9249c5a2c4 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -16,7 +16,6 @@ using osu.Game.Graphics.Sprites; using OpenTK.Graphics; using osu.Framework.Input; using osu.Game.Graphics.UserInterface; -using osu.Framework.Logging; using osu.Game.Online.API.Requests; using osu.Framework.Configuration; using osu.Framework.Audio.Track;