From 024462c52dd23b6fb31e3952192b5a680eeba69b Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 9 Dec 2024 14:35:33 +0200 Subject: [PATCH] Fixed: Fetching ICS calendar with missing series --- src/Sonarr.Api.V3/Calendar/CalendarFeedController.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Sonarr.Api.V3/Calendar/CalendarFeedController.cs b/src/Sonarr.Api.V3/Calendar/CalendarFeedController.cs index 5851c6f5a..e79105f42 100644 --- a/src/Sonarr.Api.V3/Calendar/CalendarFeedController.cs +++ b/src/Sonarr.Api.V3/Calendar/CalendarFeedController.cs @@ -54,6 +54,11 @@ public IActionResult GetCalendarFeed(int pastDays = 7, int futureDays = 28, stri { var series = allSeries.SingleOrDefault(s => s.Id == episode.SeriesId); + if (series == null) + { + continue; + } + if (premieresOnly && (episode.SeasonNumber == 0 || episode.EpisodeNumber != 1)) { continue;