From 1d8eec42ef2dfcec875fbfbe7bfc3b2c0734ed5d Mon Sep 17 00:00:00 2001 From: James White Date: Wed, 11 Oct 2017 18:19:57 +0100 Subject: [PATCH 1/3] Added: a default name for Radarr.ics (#2163) --- src/NzbDrone.Api/Calendar/CalendarFeedModule.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs b/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs index 65ba3710b..6836ed5d8 100644 --- a/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs +++ b/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs @@ -1,9 +1,10 @@ -using Nancy; +using Nancy; using System; 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; @@ -81,10 +82,13 @@ private Response GetCalendarFeed() } var movies = _movieService.GetMoviesBetweenDates(start, end, unmonitored); - var calendar = new Ical.Net.Calendar - { - ProductId = "-//radarr.video//Radarr//EN" - }; + var calendar = new Ical.Net.Calendar(); + + calendar.ProductId = "-//radarr.video//Radarr//EN"; + + var calendarName = "Radarr Movies Calendar"; + calendar.AddProperty(new CalendarProperty("NAME", calendarName)); + calendar.AddProperty(new CalendarProperty("X-WR-CALNAME", calendarName)); foreach (var movie in movies.OrderBy(v => v.Added)) { @@ -114,8 +118,10 @@ private Response GetCalendarFeed() occurrence.End = new CalDateTime(movie.InCinemas.Value.AddMinutes(movie.Runtime)) { HasTime = true }; } break; + case MovieStatusType.Announced: continue; // no date + default: if (movie.PhysicalRelease != null) { From 805927205c26250911889a290312af376991e7a9 Mon Sep 17 00:00:00 2001 From: James White Date: Wed, 11 Oct 2017 20:11:16 +0100 Subject: [PATCH 2/3] @cosmetic Simplify ical ProductId code since adding properties (#2164) --- src/NzbDrone.Api/Calendar/CalendarFeedModule.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs b/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs index 6836ed5d8..90c0ee75b 100644 --- a/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs +++ b/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs @@ -82,9 +82,10 @@ private Response GetCalendarFeed() } var movies = _movieService.GetMoviesBetweenDates(start, end, unmonitored); - var calendar = new Ical.Net.Calendar(); - - calendar.ProductId = "-//radarr.video//Radarr//EN"; + var calendar = new Ical.Net.Calendar + { + ProductId = "-//radarr.video//Radarr//EN" + }; var calendarName = "Radarr Movies Calendar"; calendar.AddProperty(new CalendarProperty("NAME", calendarName)); From 779a72217587f48660f6ebc217adfcd0c8c1b49b Mon Sep 17 00:00:00 2001 From: James White Date: Wed, 11 Oct 2017 21:45:15 +0100 Subject: [PATCH 3/3] Changed: Adjust ambiguous date options (#2165) (cherry picked from commit 00c307421666b55a6d08ff1c69c1871ccb541314) --- src/UI/Settings/UI/UiViewTemplate.hbs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/UI/Settings/UI/UiViewTemplate.hbs b/src/UI/Settings/UI/UiViewTemplate.hbs index c0cd483b5..838c716fc 100644 --- a/src/UI/Settings/UI/UiViewTemplate.hbs +++ b/src/UI/Settings/UI/UiViewTemplate.hbs @@ -45,10 +45,10 @@
@@ -62,12 +62,12 @@
@@ -77,8 +77,8 @@