mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-27 01:57:21 +00:00
Fixed DateTime parsing in SeriesProvider.CleanAirsTime, will now suppress failures because TheTvDb has random data.
This commit is contained in:
parent
df6db27d21
commit
249e6d7c4b
1 changed files with 3 additions and 2 deletions
|
@ -234,10 +234,11 @@ private static string CleanAirsTime(string rawTime)
|
|||
if (String.IsNullOrEmpty(meridiem))
|
||||
meridiem = "PM";
|
||||
|
||||
if (String.IsNullOrEmpty(time))
|
||||
DateTime dateTime;
|
||||
|
||||
if (String.IsNullOrEmpty(time) || !DateTime.TryParse(time + " " + meridiem.ToUpper(), out dateTime))
|
||||
return String.Empty;
|
||||
|
||||
var dateTime = DateTime.Parse(time + " " + meridiem.ToUpper());
|
||||
return dateTime.ToString("hh:mm tt");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue