From 568cdfbd3ca51d075fc70ee7426850cffd67b500 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sat, 8 Jul 2017 13:27:53 +0200 Subject: [PATCH] Fixed .save --- src/NadekoBot/Modules/Music/Music.cs | 7 +++---- src/NadekoBot/Services/GreetSettingsService.cs | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 3c1b06da..f137e6bf 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -466,15 +466,14 @@ namespace NadekoBot.Modules.Music { var mp = await _music.GetOrCreatePlayer(Context); - var songs = await Task.WhenAll(mp.QueueArray().Songs - .Select(async s => new PlaylistSong() + var songs = mp.QueueArray().Songs + .Select(s => new PlaylistSong() { Provider = s.Provider, ProviderType = s.ProviderType, Title = s.Title, - Uri = await s.Uri(), Query = s.Query, - }).ToList()); + }).ToList(); MusicPlaylist playlist; using (var uow = _db.UnitOfWork) diff --git a/src/NadekoBot/Services/GreetSettingsService.cs b/src/NadekoBot/Services/GreetSettingsService.cs index 7e4aaee6..ac3b84da 100644 --- a/src/NadekoBot/Services/GreetSettingsService.cs +++ b/src/NadekoBot/Services/GreetSettingsService.cs @@ -154,7 +154,10 @@ namespace NadekoBot.Services { await channel.EmbedAsync(embedData.ToEmbed(), embedData.PlainText?.SanitizeMentions() ?? "").ConfigureAwait(false); } - catch (Exception ex) { _log.Warn(ex); } + catch (Exception ex) + { + _log.Warn(ex); + } } else {