Fixed DateTime parsing in SeriesProvider.CleanAirsTime, will now suppress failures because TheTvDb has random data.

pull/4/head
Mark McDowall 13 years ago
parent df6db27d21
commit 249e6d7c4b

@ -234,10 +234,11 @@ namespace NzbDrone.Core.Providers
if (String.IsNullOrEmpty(meridiem)) if (String.IsNullOrEmpty(meridiem))
meridiem = "PM"; meridiem = "PM";
if (String.IsNullOrEmpty(time)) DateTime dateTime;
if (String.IsNullOrEmpty(time) || !DateTime.TryParse(time + " " + meridiem.ToUpper(), out dateTime))
return String.Empty; return String.Empty;
var dateTime = DateTime.Parse(time + " " + meridiem.ToUpper());
return dateTime.ToString("hh:mm tt"); return dateTime.ToString("hh:mm tt");
} }
} }

Loading…
Cancel
Save