Merge pull request #2655 from lfoust/tvdbruntimefix
Fix FormatException when mapping TVDB series
This commit is contained in:
commit
632323969f
|
@ -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…
Reference in New Issue
Block a user