mirror of
https://github.com/Radarr/Radarr
synced 2025-01-03 13:54:29 +00:00
Fixed: xem mappings for series without scene mapping
This commit is contained in:
parent
7efac124c7
commit
0069b29f88
2 changed files with 13 additions and 4 deletions
|
@ -46,14 +46,23 @@ public void should_return_empty_when_series_is_not_found()
|
|||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_get_mapping()
|
||||
[TestCase(82807)]
|
||||
public void should_get_mapping(int seriesId)
|
||||
{
|
||||
var result = Subject.GetSceneTvdbMappings(82807);
|
||||
var result = Subject.GetSceneTvdbMappings(seriesId);
|
||||
|
||||
result.Should().NotBeEmpty();
|
||||
result.Should().OnlyContain(c => c.Scene != null);
|
||||
result.Should().OnlyContain(c => c.Tvdb != null);
|
||||
}
|
||||
|
||||
|
||||
[TestCase(78916)]
|
||||
public void should_filter_out_episodes_without_scene_mapping(int seriesId)
|
||||
{
|
||||
var result = Subject.GetSceneTvdbMappings(seriesId);
|
||||
|
||||
result.Should().NotContain(c => c.Tvdb == null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -61,7 +61,7 @@ public List<XemSceneTvdbMapping> GetSceneTvdbMappings(int id)
|
|||
var response = restClient.ExecuteAndValidate<XemResult<List<XemSceneTvdbMapping>>>(request);
|
||||
CheckForFailureResult(response);
|
||||
|
||||
return response.Data;
|
||||
return response.Data.Where(c => c.Scene != null).ToList();
|
||||
}
|
||||
|
||||
private static void CheckForFailureResult<T>(XemResult<T> response)
|
||||
|
|
Loading…
Reference in a new issue