diff --git a/Shoko.Server/API/v2/Models/common/Filters.cs b/Shoko.Server/API/v2/Models/common/Filters.cs index d6aee9315..96086fda2 100644 --- a/Shoko.Server/API/v2/Models/common/Filters.cs +++ b/Shoko.Server/API/v2/Models/common/Filters.cs @@ -33,8 +33,13 @@ internal static Filters GenerateFromGroupFilter(HttpContext ctx, FilterPreset gf var f = new Filters { id = gf.FilterPresetID, name = gf.Name }; var hideCategories = ctx.GetUser().GetHideCategories(); var gfs = RepoFactory.FilterPreset.GetByParentID(f.id).AsParallel().Where(a => - !a.Hidden && !((a.FilterType & GroupFilterType.Tag) != 0 && - (!hideCategories.Contains(a.Name) || TagFilter.IsTagBlackListed(a.Name, tagfilter)))) + { + if (a.Hidden) return false; + // return true if it's not a tag + if ((a.FilterType & GroupFilterType.Tag) == 0) return true; + if (hideCategories.Contains(a.Name)) return false; + return !TagFilter.IsTagBlackListed(a.Name, tagfilter); + }) .ToList(); if (evaluatedResults == null)