From 9a1bed84004aec4d87de652095b55a3b4f0f78ff Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 19 Oct 2020 02:15:14 +0200 Subject: [PATCH] add marudor url to .ics --- bahnplan.web/Pages/GenIcs.cshtml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bahnplan.web/Pages/GenIcs.cshtml.cs b/bahnplan.web/Pages/GenIcs.cshtml.cs index ecb075c..73b2cdb 100644 --- a/bahnplan.web/Pages/GenIcs.cshtml.cs +++ b/bahnplan.web/Pages/GenIcs.cshtml.cs @@ -61,7 +61,14 @@ namespace bahnplan.web.Pages { }; if (!string.IsNullOrWhiteSpace(leg.Comment)) - e.Description = leg.Comment; + e.Description = + leg.Comment + + "\n" + + "\n" + + $"https://marudor.de/details/{leg.TrainType}{leg.TrainNr}/{DateTime.Parse(leg.DepTime).ToUniversalTime().Subtract(new DateTime(1970, 1, 1)).TotalSeconds}000/?station={leg.DepStationId}"; + + else + e.Description = $"https://marudor.de/details/{leg.TrainType}{leg.TrainNr}/{DateTime.Parse(leg.DepTime).ToUniversalTime().Subtract(new DateTime(1970, 1, 1)).TotalSeconds}000/?station={leg.DepStationId}"; calendar.Events.Add(e); }