From 7b4273f264f8ba367cbb5a58baa34d4fc40ba42b Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Sun, 20 Oct 2024 15:13:24 +0200 Subject: [PATCH] fix: inverse boolean logic for import limbo check --- Shoko.Server/API/v3/Helpers/ModelHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shoko.Server/API/v3/Helpers/ModelHelper.cs b/Shoko.Server/API/v3/Helpers/ModelHelper.cs index b941e8a00..833ccb0c9 100644 --- a/Shoko.Server/API/v3/Helpers/ModelHelper.cs +++ b/Shoko.Server/API/v3/Helpers/ModelHelper.cs @@ -552,8 +552,8 @@ public static ListResult FilterFiles(IEnumerable input, SV if (include_only.Contains(FileIncludeOnlyType.Unrecognized) && xrefs.Count > 0) return false; // this one is also special because files in import limbo are excluded by default - if (!include_only.Contains(FileIncludeOnlyType.ImportLimbo) && !include.Contains(FileNonDefaultIncludeType.ImportLimbo) && xrefs.Count > 0 && xrefs.Any(x => x.AniDBAnime is not null && x.AniDBEpisode is not null)) return false; - if (include_only.Contains(FileIncludeOnlyType.ImportLimbo) && !(xrefs.Count > 0 && xrefs.Any(x => x.AniDBAnime is not null && x.AniDBEpisode is not null))) return false; + if (!include_only.Contains(FileIncludeOnlyType.ImportLimbo) && !include.Contains(FileNonDefaultIncludeType.ImportLimbo) && xrefs.Count > 0 && xrefs.Any(x => x.AniDBAnime is null || x.AniDBEpisode is null)) return false; + if (include_only.Contains(FileIncludeOnlyType.ImportLimbo) && !(xrefs.Count > 0 && xrefs.Any(x => x.AniDBAnime is null || x.AniDBEpisode is null))) return false; if (exclude.Contains(FileExcludeTypes.ManualLinks) && xrefs.Count > 0 && xrefs.All(xref => xref.CrossRefSource == (int)CrossRefSource.User)) return false;