From 3fb337e20b4b51605ef6c1a5e849af15aa2f5dbb Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 22 Apr 2023 19:45:04 -0500 Subject: [PATCH] Fixed: Tag filtering on iCal feed Fixes #8359 --- src/Radarr.Api.V3/Calendar/CalendarFeedController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Radarr.Api.V3/Calendar/CalendarFeedController.cs b/src/Radarr.Api.V3/Calendar/CalendarFeedController.cs index 1df33a24b..377561f62 100644 --- a/src/Radarr.Api.V3/Calendar/CalendarFeedController.cs +++ b/src/Radarr.Api.V3/Calendar/CalendarFeedController.cs @@ -26,15 +26,15 @@ public CalendarFeedController(IMovieService movieService, ITagService tagService } [HttpGet("Radarr.ics")] - public IActionResult GetCalendarFeed(int pastDays = 7, int futureDays = 28, string tagList = "", bool unmonitored = false) + public IActionResult GetCalendarFeed(int pastDays = 7, int futureDays = 28, string tags = "", bool unmonitored = false) { var start = DateTime.Today.AddDays(-pastDays); var end = DateTime.Today.AddDays(futureDays); - var tags = new List(); + var parsedTags = new List(); - if (tagList.IsNotNullOrWhiteSpace()) + if (tags.IsNotNullOrWhiteSpace()) { - tags.AddRange(tagList.Split(',').Select(_tagService.GetTag).Select(t => t.Id)); + parsedTags.AddRange(tags.Split(',').Select(_tagService.GetTag).Select(t => t.Id)); } var movies = _movieService.GetMoviesBetweenDates(start, end, unmonitored); @@ -49,7 +49,7 @@ public IActionResult GetCalendarFeed(int pastDays = 7, int futureDays = 28, stri foreach (var movie in movies.OrderBy(v => v.Added)) { - if (tags.Any() && tags.None(movie.Tags.Contains)) + if (parsedTags.Any() && parsedTags.None(movie.Tags.Contains)) { continue; }