diff --git a/hsync/Command.cs b/hsync/Command.cs index f777834..b00d55b 100644 --- a/hsync/Command.cs +++ b/hsync/Command.cs @@ -665,7 +665,10 @@ static void _uploadToServerArticlesData(int range1 = 0, int range2 = int.MaxValu string.Join(',', query.Select(x => $"(\"{_ggg(x.Title)}\", {x.Id}, " + $"\"{x.EHash}\", \"{_ggg(x.Type)}\", \"{_ggg(x.Language)}\", " + $"\"{_ggg(x.Uploader)}\", \"{(x.Published.HasValue ? x.Published.Value.ToString("yyyy-MM-dd HH:mm:ss") : "")}\", " + - $"{x.Files}, \"{_ggg(x.Class)}\", {x.ExistOnHitomi})")); + $"{x.Files}, \"{_ggg(x.Class)}\", {x.ExistOnHitomi})")) + " " + + "ON DUPLICATE KEY UPDATE " + + "Title=VALUES(Title), EHash=VALUES(EHash), Type=VALUES(Type), Language=VALUES(Language)," + + "Uploader=VALUES(Uploader),Published=VALUES(Published),Files=VALUES(Files),Class=VALUES(Class),ExistOnHitomi=VALUES(ExistOnHitomi)"; myCommand.ExecuteNonQuery(); var new_index_artist = new List<(string, int)>();