diff --git a/Shoko.Server/Filters/FilterExtensions.cs b/Shoko.Server/Filters/FilterExtensions.cs index 8eb056a32..5ac06bbb6 100644 --- a/Shoko.Server/Filters/FilterExtensions.cs +++ b/Shoko.Server/Filters/FilterExtensions.cs @@ -31,7 +31,7 @@ public static Filterable ToFilterable(this SVR_AnimeSeries series, ILookup series.GetAnime()?.GetCustomTagsForAnime().Select(a => a.TagName).ToHashSet(StringComparer.InvariantCultureIgnoreCase) ?? new HashSet(), YearsDelegate = () => GetYears(series), - SeasonsDelegate = () => series.GetAnime()?.GetSeasons().ToHashSet(), + SeasonsDelegate = () => series.GetAnime()?.GetSeasons().ToHashSet() ?? new HashSet<(int Year, AnimeSeason Season)>(), HasTvDBLinkDelegate = () => RepoFactory.CrossRef_AniDB_TvDB.GetByAnimeID(series.AniDB_ID).Any(), HasMissingTvDbLinkDelegate = () => HasMissingTvDBLink(series), // expensive, as these are direct @@ -221,7 +221,7 @@ public static Filterable ToFilterable(this SVR_AnimeGroup group, ILookup(parts[0])); - }).ToHashSet(), + }).ToHashSet() ?? new HashSet<(int, AnimeSeason)>(), HasTvDBLinkDelegate = () => series.Any(a => RepoFactory.CrossRef_AniDB_TvDB.GetByAnimeID(a.AniDB_ID).Any()), HasMissingTvDbLinkDelegate = () => HasMissingTvDBLink(group), HasTMDbLinkDelegate =