Finished load/save

This commit is contained in:
Master Kwoth 2016-04-07 13:11:29 +02:00
parent 4f898dc653
commit 84efa58780

View File

@ -441,7 +441,7 @@ namespace NadekoBot.Modules
{ {
CreatorId = (long)e.User.Id, CreatorId = (long)e.User.Id,
CreatorName = e.User.Name, CreatorName = e.User.Name,
Name = name, Name = name.ToLowerInvariant(),
}; };
DbHandler.Instance.SaveAll(songInfos); DbHandler.Instance.SaveAll(songInfos);
@ -468,7 +468,7 @@ namespace NadekoBot.Modules
await textCh.SendMessage("💢 You need to be in a voice channel on this server.\n If you are already in a voice channel, try rejoining."); await textCh.SendMessage("💢 You need to be in a voice channel on this server.\n If you are already in a voice channel, try rejoining.");
return; return;
} }
var name = e.GetArg("name")?.Trim(); var name = e.GetArg("name")?.Trim().ToLowerInvariant();
if (string.IsNullOrWhiteSpace(name)) if (string.IsNullOrWhiteSpace(name))
return; return;
@ -483,7 +483,7 @@ namespace NadekoBot.Modules
return; return;
var playlist = DbHandler.Instance.FindOne<MusicPlaylist>( var playlist = DbHandler.Instance.FindOne<MusicPlaylist>(
p => p.Name.ToLower() == name); p => p.Id == playlistNumber);
if (playlist == null) if (playlist == null)
{ {