From 55fd02dac4c0dd876570012786cd5737c2b7e4f4 Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Thu, 12 Dec 2024 23:31:41 +0100 Subject: [PATCH] fix: fixed inverse boolean logic in tmdb controller in APIv3 I accidentally added the inverse boolean expression of what it should had been and forgot to fix it yesterday when I actually tested it. My bad. Fix for c00573933284a6abe736a96d1f2fedefa054cb19. --- Shoko.Server/API/v3/Controllers/TmdbController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Shoko.Server/API/v3/Controllers/TmdbController.cs b/Shoko.Server/API/v3/Controllers/TmdbController.cs index 47aa99a25..c6c620ca9 100644 --- a/Shoko.Server/API/v3/Controllers/TmdbController.cs +++ b/Shoko.Server/API/v3/Controllers/TmdbController.cs @@ -1314,7 +1314,7 @@ public ActionResult> GetTmdbEpisodesByTmdbShowID( if (includeHidden is not IncludeOnlyFilter.True) { var shouldHideHidden = includeHidden is IncludeOnlyFilter.False; - altEpisodes = altEpisodes.Where(t => t.episode.IsHidden == shouldHideHidden); + altEpisodes = altEpisodes.Where(t => t.episode.IsHidden != shouldHideHidden); } if (seasonNumber is not null && episodeNumber is not null) altEpisodes = altEpisodes.Where(t => t.episode.SeasonNumber == seasonNumber && t.episode.EpisodeNumber == episodeNumber); @@ -1336,7 +1336,7 @@ public ActionResult> GetTmdbEpisodesByTmdbShowID( if (includeHidden is not IncludeOnlyFilter.True) { var shouldHideHidden = includeHidden is IncludeOnlyFilter.False; - episodes = episodes.Where(e => e.IsHidden == shouldHideHidden); + episodes = episodes.Where(e => e.IsHidden != shouldHideHidden); } if (seasonNumber is not null && episodeNumber is not null) episodes = episodes.Where(e => e.SeasonNumber == seasonNumber && e.EpisodeNumber == episodeNumber); @@ -1876,7 +1876,7 @@ public ActionResult> GetTmdbEpisodesBySeasonID( if (includeHidden is not IncludeOnlyFilter.True) { var shouldHideHidden = includeHidden is IncludeOnlyFilter.False; - altEpisodes = altEpisodes.Where(t => t.episode.IsHidden == shouldHideHidden); + altEpisodes = altEpisodes.Where(t => t.episode.IsHidden != shouldHideHidden); } return altEpisodes .ToListResult(t => new TmdbEpisode(altShow, t.episode, t.ordering, include?.CombineFlags(), language), page, pageSize); @@ -1895,7 +1895,7 @@ public ActionResult> GetTmdbEpisodesBySeasonID( if (includeHidden is not IncludeOnlyFilter.True) { var shouldHideHidden = includeHidden is IncludeOnlyFilter.False; - episodes = episodes.Where(e => e.IsHidden == shouldHideHidden); + episodes = episodes.Where(e => e.IsHidden != shouldHideHidden); } return episodes .ToListResult(e => new TmdbEpisode(show, e, include?.CombineFlags(), language), page, pageSize);