mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-12-19 12:53:11 -05:00
Some refactorings - Updated editorconfig, removed some unused variables and parameters, updated some old thorwaway variable code, some general cleanup
This commit is contained in:
@@ -107,7 +107,6 @@ public class SearchImageCacher : INService
|
||||
|
||||
private ImageData QueryLocal(
|
||||
string[] tags,
|
||||
bool forceExplicit,
|
||||
Booru type,
|
||||
HashSet<string> blacklistedTags)
|
||||
{
|
||||
@@ -194,7 +193,7 @@ public class SearchImageCacher : INService
|
||||
return default;
|
||||
|
||||
// query for an image
|
||||
var image = QueryLocal(tags, forceExplicit, type, blacklistedTags);
|
||||
var image = QueryLocal(tags, type, blacklistedTags);
|
||||
if (image is not null)
|
||||
return image;
|
||||
|
||||
@@ -211,7 +210,7 @@ public class SearchImageCacher : INService
|
||||
if (!success)
|
||||
return default;
|
||||
|
||||
image = QueryLocal(tags, forceExplicit, type, blacklistedTags);
|
||||
image = QueryLocal(tags, type, blacklistedTags);
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SearchImagesService : ISearchImagesService, INService
|
||||
using var uow = db.GetDbContext();
|
||||
BlacklistedTags = new(uow.NsfwBlacklistedTags.AsEnumerable()
|
||||
.GroupBy(x => x.GuildId)
|
||||
.ToDictionary(x => x.Key, x => new HashSet<string>(x.Select(x => x.Tag))));
|
||||
.ToDictionary(x => x.Key, x => new HashSet<string>(x.Select(y => y.Tag))));
|
||||
}
|
||||
|
||||
private Task<UrlReply> GetNsfwImageAsync(
|
||||
|
||||
Reference in New Issue
Block a user