fixed migration?
This commit is contained in:
parent
f5d39c259c
commit
e3b087415d
@ -1 +1 @@
|
|||||||
Subproject commit 6a7f7b81322266977ef809e521af6c199ec8de54
|
Subproject commit 39df50a5eaace37d31848a42f651a9fc40f8f534
|
@ -81,7 +81,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
private void MigrateDb0_9(IUnitOfWork uow)
|
private void MigrateDb0_9(IUnitOfWork uow)
|
||||||
{
|
{
|
||||||
var db = new SqliteConnection("Data Source=data/nadekobot.sqlite;Version=3;");
|
var db = new SqliteConnection("Data Source=data/nadekobot.sqlite");
|
||||||
db.Open();
|
db.Open();
|
||||||
|
|
||||||
var com = db.CreateCommand();
|
var com = db.CreateCommand();
|
||||||
|
@ -203,14 +203,14 @@ namespace NadekoBot.Modules.Searches
|
|||||||
{
|
{
|
||||||
var channel = (ITextChannel)msg.Channel;
|
var channel = (ITextChannel)msg.Channel;
|
||||||
|
|
||||||
username = username.ToUpperInvariant().Trim();
|
username = username.ToLowerInvariant().Trim();
|
||||||
|
|
||||||
FollowedStream toRemove;
|
FollowedStream toRemove;
|
||||||
using (var uow = DbHandler.UnitOfWork())
|
using (var uow = DbHandler.UnitOfWork())
|
||||||
{
|
{
|
||||||
var config = uow.GuildConfigs.For(channel.Guild.Id);
|
var config = uow.GuildConfigs.For(channel.Guild.Id);
|
||||||
var streams = config.FollowedStreams;
|
var streams = config.FollowedStreams;
|
||||||
toRemove = streams.Where(fs => fs.ChannelId == channel.Id && fs.Username.ToUpperInvariant() == username).FirstOrDefault();
|
toRemove = streams.Where(fs => fs.ChannelId == channel.Id && fs.Username.ToLowerInvariant() == username).FirstOrDefault();
|
||||||
if (toRemove != null)
|
if (toRemove != null)
|
||||||
{
|
{
|
||||||
config.FollowedStreams = new HashSet<FollowedStream>(streams.Except(new[] { toRemove }));
|
config.FollowedStreams = new HashSet<FollowedStream>(streams.Except(new[] { toRemove }));
|
||||||
@ -258,7 +258,7 @@ namespace NadekoBot.Modules.Searches
|
|||||||
|
|
||||||
private async Task TrackStream(ITextChannel channel, string username, FollowedStream.FollowedStreamType type)
|
private async Task TrackStream(ITextChannel channel, string username, FollowedStream.FollowedStreamType type)
|
||||||
{
|
{
|
||||||
username = username.ToUpperInvariant().Trim();
|
username = username.ToLowerInvariant().Trim();
|
||||||
var stream = new FollowedStream
|
var stream = new FollowedStream
|
||||||
{
|
{
|
||||||
GuildId = channel.Guild.Id,
|
GuildId = channel.Guild.Id,
|
||||||
@ -269,7 +269,7 @@ namespace NadekoBot.Modules.Searches
|
|||||||
bool exists;
|
bool exists;
|
||||||
using (var uow = DbHandler.UnitOfWork())
|
using (var uow = DbHandler.UnitOfWork())
|
||||||
{
|
{
|
||||||
exists = uow.GuildConfigs.For(channel.Guild.Id).FollowedStreams.Where(fs => fs.ChannelId == channel.Id && fs.Username.ToUpperInvariant().Trim() == username).Any();
|
exists = uow.GuildConfigs.For(channel.Guild.Id).FollowedStreams.Where(fs => fs.ChannelId == channel.Id && fs.Username.ToLowerInvariant().Trim() == username).Any();
|
||||||
}
|
}
|
||||||
if (exists)
|
if (exists)
|
||||||
{
|
{
|
||||||
|
BIN
src/NadekoBot/libs/libsodium.dll
Normal file
BIN
src/NadekoBot/libs/libsodium.dll
Normal file
Binary file not shown.
BIN
src/NadekoBot/libs/opus.dll
Normal file
BIN
src/NadekoBot/libs/opus.dll
Normal file
Binary file not shown.
@ -10,8 +10,11 @@
|
|||||||
"exclude": [ ],
|
"exclude": [ ],
|
||||||
},
|
},
|
||||||
"copyToOutput": {
|
"copyToOutput": {
|
||||||
"include": [ "data" ],
|
"include": [ "data" , "libs"],
|
||||||
"exclude": [ "data/musicdata" ]
|
"exclude": [ "data/musicdata" ],
|
||||||
|
"mappings": {
|
||||||
|
"./": "./libs"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Loading…
Reference in New Issue
Block a user