!wip fixed a bug in the newsletter

pull/2107/head
Jamie 7 years ago
parent 2869d1526c
commit 71157052b3

@ -330,8 +330,16 @@ namespace Ombi.Schedule.Jobs.Ombi
TableData(sb); TableData(sb);
Href(sb, $"https://www.imdb.com/title/{info.ImdbId}/"); Href(sb, $"https://www.imdb.com/title/{info.ImdbId}/");
var releaseDate = DateTime.Parse(info.ReleaseDate); var releaseDate = string.Empty;
Header(sb, 3, $"{info.Title} ({releaseDate.Year})"); try
{
releaseDate = $"({DateTime.Parse(info.ReleaseDate).Year})";
}
catch (Exception)
{
// Swallow, couldn't parse the date
}
Header(sb, 3, $"{info.Title} {releaseDate}");
EndTag(sb, "a"); EndTag(sb, "a");
if (info.Genres.Any()) if (info.Genres.Any())

Loading…
Cancel
Save