Merge pull request #2655 from lfoust/tvdbruntimefix

Fix FormatException when mapping TVDB series
pull/2668/head
Bond-009 5 years ago committed by GitHub
commit 632323969f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -344,7 +344,11 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
series.ProductionYear = date.Year;
}
series.RunTimeTicks = TimeSpan.FromMinutes(Convert.ToDouble(tvdbSeries.Runtime)).Ticks;
if (!string.IsNullOrEmpty(tvdbSeries.Runtime) && double.TryParse(tvdbSeries.Runtime, out double runtime))
{
series.RunTimeTicks = TimeSpan.FromMinutes(runtime).Ticks;
}
foreach (var genre in tvdbSeries.Genre)
{
series.AddGenre(genre);

Loading…
Cancel
Save