Fixed: Don't attempt to import from list with title only (#6477)
Closes #6474
This commit is contained in:
parent
895eccebc5
commit
34e74eecd7
|
@ -406,17 +406,6 @@ namespace NzbDrone.Core.Test.ImportListTests
|
||||||
.Verify(v => v.AddSeries(It.Is<List<Series>>(s => s.Count == 3), true), Times.Once());
|
.Verify(v => v.AddSeries(It.Is<List<Series>>(s => s.Count == 3), true), Times.Once());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void should_search_if_series_title_and_no_series_id()
|
|
||||||
{
|
|
||||||
_importListFetch.Series.ForEach(m => m.ImportListId = 1);
|
|
||||||
WithList(1, true);
|
|
||||||
Subject.Execute(_commandAll);
|
|
||||||
|
|
||||||
Mocker.GetMock<ISearchForNewSeries>()
|
|
||||||
.Verify(v => v.SearchForNewSeries(It.IsAny<string>()), Times.Once());
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_not_search_if_series_title_and_series_id()
|
public void should_not_search_if_series_title_and_series_id()
|
||||||
{
|
{
|
||||||
|
|
|
@ -190,19 +190,6 @@ namespace NzbDrone.Core.ImportLists
|
||||||
item.Title = mappedSeries.Title;
|
item.Title = mappedSeries.Title;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map TVDb if we only have a series name
|
|
||||||
if (item.TvdbId <= 0 && item.Title.IsNotNullOrWhiteSpace())
|
|
||||||
{
|
|
||||||
var mappedSeries = _seriesSearchService.SearchForNewSeries(item.Title)
|
|
||||||
.FirstOrDefault();
|
|
||||||
|
|
||||||
if (mappedSeries != null)
|
|
||||||
{
|
|
||||||
item.TvdbId = mappedSeries.TvdbId;
|
|
||||||
item.Title = mappedSeries?.Title;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check to see if series excluded
|
// Check to see if series excluded
|
||||||
var excludedSeries = listExclusions.Where(s => s.TvdbId == item.TvdbId).SingleOrDefault();
|
var excludedSeries = listExclusions.Where(s => s.TvdbId == item.TvdbId).SingleOrDefault();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue