From e978a425c21c2acd1b555bdbcb1830fb7e7c0bfd Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 19 Oct 2014 20:04:46 -0700 Subject: [PATCH] Fixed: Getting list of xem series won't die if a bad ID is entered on their site --- src/NzbDrone.Core/DataAugmentation/Xem/XemProxy.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/DataAugmentation/Xem/XemProxy.cs b/src/NzbDrone.Core/DataAugmentation/Xem/XemProxy.cs index ba0186bf5..6f346e75c 100644 --- a/src/NzbDrone.Core/DataAugmentation/Xem/XemProxy.cs +++ b/src/NzbDrone.Core/DataAugmentation/Xem/XemProxy.cs @@ -6,6 +6,7 @@ using NzbDrone.Common.Http; using NzbDrone.Core.DataAugmentation.Scene; using NzbDrone.Core.DataAugmentation.Xem.Model; +using Omu.ValueInjecter; namespace NzbDrone.Core.DataAugmentation.Xem { @@ -44,10 +45,16 @@ public List GetXemSeriesIds() _logger.Debug("Fetching Series IDs from"); var request = _xemRequestBuilder.Build("/havemap"); - var response = _httpClient.Get>>(request).Resource; + var response = _httpClient.Get>>(request).Resource; CheckForFailureResult(response); - return response.Data.ToList(); + return response.Data.Select(d => + { + int tvdbId = 0; + Int32.TryParse(d, out tvdbId); + + return tvdbId; + }).Where(t => t > 0).ToList(); } public List GetSceneTvdbMappings(int id)