Fixed: Reverted a change that caused SQL error on NetImport

c300af8241 (diff-4199a537105793b9a05a6232cb0531bb)

that caused SQL error when doing netimport search

update tests

update tests

revert tests then remove

revert tests changes --> comment out the tests
This commit is contained in:
geogolem 2020-01-02 22:28:11 -05:00 committed by Qstick
parent bf0c716aa5
commit 4385acef99
2 changed files with 3 additions and 7 deletions

View File

@ -363,6 +363,7 @@ namespace NzbDrone.Core.Test.NetImport
.Verify(v => v.AddMovies(It.Is<List<Movie>>(s => s.Count == 7 && !s.Any(m => m.TmdbId == _moviesList2[0].TmdbId))), Times.Once()); .Verify(v => v.AddMovies(It.Is<List<Movie>>(s => s.Count == 7 && !s.Any(m => m.TmdbId == _moviesList2[0].TmdbId))), Times.Once());
} }
/*
[Test] [Test]
public void should_not_tmdb_map_movie_that_has_tmdbid_from_list() public void should_not_tmdb_map_movie_that_has_tmdbid_from_list()
{ {
@ -400,6 +401,6 @@ namespace NzbDrone.Core.Test.NetImport
Mocker.GetMock<IMovieService>() Mocker.GetMock<IMovieService>()
.Verify(v => v.AddMovies(It.Is<List<Movie>>(s => s.Count == 5)), Times.Once()); .Verify(v => v.AddMovies(It.Is<List<Movie>>(s => s.Count == 5)), Times.Once());
} }*/
} }
} }

View File

@ -135,12 +135,7 @@ namespace NzbDrone.Core.NetImport
foreach (var movie in listedMovies) foreach (var movie in listedMovies)
{ {
var mapped = movie; var mapped = _movieSearch.MapMovieToTmdbMovie(movie);
if (mapped.TmdbId == 0)
{
mapped = _movieSearch.MapMovieToTmdbMovie(movie);
}
if (mapped != null && mapped.TmdbId > 0) if (mapped != null && mapped.TmdbId > 0)
{ {