Skip to content

Commit

Permalink
fix: fixed inverse boolean logic in tmdb controller in APIv3
Browse files Browse the repository at this point in the history
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 c005739.
  • Loading branch information
revam committed Dec 12, 2024
1 parent 35297d9 commit 55fd02d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Shoko.Server/API/v3/Controllers/TmdbController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ public ActionResult<ListResult<TmdbEpisode>> 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);
Expand All @@ -1336,7 +1336,7 @@ public ActionResult<ListResult<TmdbEpisode>> 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);
Expand Down Expand Up @@ -1876,7 +1876,7 @@ public ActionResult<ListResult<TmdbEpisode>> 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);
Expand All @@ -1895,7 +1895,7 @@ public ActionResult<ListResult<TmdbEpisode>> 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);
Expand Down

0 comments on commit 55fd02d

Please sign in to comment.