mirror of
https://github.com/Radarr/Radarr
synced 2024-12-27 10:19:41 +00:00
Fixed: Getting list of xem series won't die if a bad ID is entered on their site
This commit is contained in:
parent
f776aae2c0
commit
e978a425c2
1 changed files with 9 additions and 2 deletions
|
@ -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<int> GetXemSeriesIds()
|
|||
_logger.Debug("Fetching Series IDs from");
|
||||
|
||||
var request = _xemRequestBuilder.Build("/havemap");
|
||||
var response = _httpClient.Get<XemResult<List<int>>>(request).Resource;
|
||||
var response = _httpClient.Get<XemResult<List<string>>>(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<XemSceneTvdbMapping> GetSceneTvdbMappings(int id)
|
||||
|
|
Loading…
Reference in a new issue