mirror of
https://github.com/RPCS3/discord-bot.git
synced 2025-01-31 15:33:44 +00:00
fix syscall extraction to exclude cellSysutill message logging
This commit is contained in:
parent
ff402160d2
commit
2536f877a9
@ -58,15 +58,15 @@ namespace CompatBot.Database.Providers
|
||||
int funcs = 0, links = 0;
|
||||
using (var db = new ThumbnailDb())
|
||||
{
|
||||
var funcsToFix = new List<SyscallInfo>(0);
|
||||
var funcsToRemove = new List<SyscallInfo>(0);
|
||||
try
|
||||
{
|
||||
funcsToFix = await db.SyscallInfo.Where(sci => sci.Function.Contains('(')).ToListAsync().ConfigureAwait(false);
|
||||
funcs = funcsToFix.Count;
|
||||
funcsToRemove = await db.SyscallInfo.Where(sci => sci.Function.Contains('(') || sci.Function.StartsWith('“')).ToListAsync().ConfigureAwait(false);
|
||||
funcs = funcsToRemove.Count;
|
||||
if (funcs == 0)
|
||||
return (0, 0);
|
||||
|
||||
foreach (var sci in funcsToFix)
|
||||
foreach (var sci in funcsToRemove.Where(sci => sci.Function.Contains('(')))
|
||||
{
|
||||
var productIds = await db.SyscallToProductMap.AsNoTracking().Where(m => m.SyscallInfoId == sci.Id).Select(m => m.Product.ProductCode).Distinct().ToListAsync().ConfigureAwait(false);
|
||||
links += productIds.Count;
|
||||
@ -90,7 +90,7 @@ namespace CompatBot.Database.Providers
|
||||
{
|
||||
try
|
||||
{
|
||||
db.SyscallInfo.RemoveRange(funcsToFix);
|
||||
db.SyscallInfo.RemoveRange(funcsToRemove);
|
||||
await db.SaveChangesAsync().ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -212,7 +212,7 @@ namespace CompatBot.EventHandlers.LogParsing
|
||||
["Unimplemented syscall"] = new Regex(@"U \d+:\d+:\d+\.\d+ ({(?<unimplemented_syscall_context>.+?)} )?.*Unimplemented syscall (?<unimplemented_syscall>.*)\r?$", DefaultOptions),
|
||||
["Could not enqueue"] = new Regex(@"cellAudio: Could not enqueue buffer onto audio backend(?<enqueue_buffer_error>.).*\r?$", DefaultOptions),
|
||||
["Failed to bind device"] = new Regex(@"Failed to bind device (?<failed_pad>.+) to handler (?<failed_pad_handler>.+).*\r?$", DefaultOptions),
|
||||
["{PPU["] = new Regex(@"{PPU\[.+\]} (?<syscall_module>[^ :]+)( TODO)?: (?<syscall_name>[^ :]+?)\(.*\r?$", DefaultOptions),
|
||||
["{PPU["] = new Regex(@"{PPU\[.+\]} (?<syscall_module>[^ :]+)( TODO)?: (?!\xE2\x80\x9C)(?<syscall_name>[^ :]+?)\(.*\r?$", DefaultOptions),
|
||||
["undub"] = new Regex(@"(\b|_)(?<game_mod>undub)(\b|_)", DefaultOptions | RegexOptions.IgnoreCase),
|
||||
},
|
||||
OnNewLineAsync = LimitedPiracyCheckAsync,
|
||||
|
Loading…
x
Reference in New Issue
Block a user