From 22378b28f56c68add5e844cde912c55ca0be9523 Mon Sep 17 00:00:00 2001 From: James White Date: Fri, 13 Oct 2017 22:06:54 +0100 Subject: [PATCH] New: Add default calendar name for iCal --- src/NzbDrone.Api/Calendar/CalendarFeedModule.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs b/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs index d8a95880a..aec7320e7 100644 --- a/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs +++ b/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using Ical.Net; using Ical.Net.DataTypes; +using Ical.Net.General; using Ical.Net.Interfaces.Serialization; using Ical.Net.Serialization; using Ical.Net.Serialization.iCalendar.Factory; @@ -92,6 +93,10 @@ namespace NzbDrone.Api.Calendar ProductId = "-//sonarr.tv//Sonarr//EN" }; + var calendarName = "Sonarr TV Schedule"; + calendar.AddProperty(new CalendarProperty("NAME", calendarName)); + calendar.AddProperty(new CalendarProperty("X-WR-CALNAME", calendarName)); + foreach (var episode in episodes.OrderBy(v => v.AirDateUtc.Value)) { if (premiersOnly && (episode.SeasonNumber == 0 || episode.EpisodeNumber != 1))