Fixed: Updating Kodi won't fail if a series has an IMDB ID instead of a TVDB ID

This commit is contained in:
Mark McDowall
2015-03-05 00:22:46 -08:00
parent 8b1e0f68dd
commit f021f9b146
4 changed files with 43 additions and 14 deletions

View File

@@ -65,7 +65,13 @@ namespace NzbDrone.Core.Notifications.Xbmc
return null;
}
var matchingSeries = allSeries.FirstOrDefault(s => s.ImdbNumber == series.TvdbId || s.Label == series.Title);
var matchingSeries = allSeries.FirstOrDefault(s =>
{
var tvdbId = 0;
Int32.TryParse(s.ImdbNumber, out tvdbId);
return tvdbId == series.TvdbId || s.Label == series.Title;
});
if (matchingSeries != null) return matchingSeries.File;