Fixed .save

This commit is contained in:
Master Kwoth 2017-07-08 13:27:53 +02:00
parent 4132565948
commit 568cdfbd3c
2 changed files with 7 additions and 5 deletions

View File

@ -466,15 +466,14 @@ namespace NadekoBot.Modules.Music
{ {
var mp = await _music.GetOrCreatePlayer(Context); var mp = await _music.GetOrCreatePlayer(Context);
var songs = await Task.WhenAll(mp.QueueArray().Songs var songs = mp.QueueArray().Songs
.Select(async s => new PlaylistSong() .Select(s => new PlaylistSong()
{ {
Provider = s.Provider, Provider = s.Provider,
ProviderType = s.ProviderType, ProviderType = s.ProviderType,
Title = s.Title, Title = s.Title,
Uri = await s.Uri(),
Query = s.Query, Query = s.Query,
}).ToList()); }).ToList();
MusicPlaylist playlist; MusicPlaylist playlist;
using (var uow = _db.UnitOfWork) using (var uow = _db.UnitOfWork)

View File

@ -154,7 +154,10 @@ namespace NadekoBot.Services
{ {
await channel.EmbedAsync(embedData.ToEmbed(), embedData.PlainText?.SanitizeMentions() ?? "").ConfigureAwait(false); await channel.EmbedAsync(embedData.ToEmbed(), embedData.PlainText?.SanitizeMentions() ?? "").ConfigureAwait(false);
} }
catch (Exception ex) { _log.Warn(ex); } catch (Exception ex)
{
_log.Warn(ex);
}
} }
else else
{ {