Fix error when we get invalid datetime from our api.

Leonardo Galli 8 years ago
parent cff4578c66
commit b70ed720c5

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
@ -556,6 +556,8 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
imdbMovie.Title = result.title;
imdbMovie.TitleSlug = Parser.Parser.ToUrlSlug(result.title);
try
{
if (result.release_date.IsNotNullOrWhiteSpace())
{
imdbMovie.InCinemas = DateTime.Parse(result.release_date);
@ -570,6 +572,12 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
imdbMovie.PhysicalReleaseNote = result.physical_release_note;
}
}
}
catch (Exception ex)
{
_logger.Debug("Not a valid date time.");
}
var now = DateTime.Now;

Loading…
Cancel
Save