Skip to content

Commit

Permalink
fix: inverse boolean logic for import limbo check
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Oct 20, 2024
1 parent 46ebde4 commit 7b4273f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Shoko.Server/API/v3/Helpers/ModelHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ public static ListResult<File> FilterFiles(IEnumerable<SVR_VideoLocal> 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;
Expand Down

0 comments on commit 7b4273f

Please sign in to comment.