diff --git a/src/NzbDrone.Core.Test/ImportListTests/ImportListSyncServiceFixture.cs b/src/NzbDrone.Core.Test/ImportListTests/ImportListSyncServiceFixture.cs index a819108e1..1f82da268 100644 --- a/src/NzbDrone.Core.Test/ImportListTests/ImportListSyncServiceFixture.cs +++ b/src/NzbDrone.Core.Test/ImportListTests/ImportListSyncServiceFixture.cs @@ -43,6 +43,7 @@ namespace NzbDrone.Core.Test.ImportListTests .Returns(x => Builder .CreateListOfSize(1) .TheFirst(1) + .With(b => b.ForeignBookId = "4321") .With(b => b.Editions = Builder .CreateListOfSize(1) .TheFirst(1) @@ -84,7 +85,7 @@ namespace NzbDrone.Core.Test.ImportListTests private void WithBookId() { - _importListReports.First().EditionGoodreadsId = "101"; + _importListReports.First().EditionGoodreadsId = "1234"; } private void WithExistingArtist() @@ -122,7 +123,7 @@ namespace NzbDrone.Core.Test.ImportListTests { new ImportListExclusion { - ForeignId = "101" + ForeignId = "4321" } }); } diff --git a/src/NzbDrone.Core/ImportLists/ImportListSyncService.cs b/src/NzbDrone.Core/ImportLists/ImportListSyncService.cs index a100ae2bb..4568e3f14 100644 --- a/src/NzbDrone.Core/ImportLists/ImportListSyncService.cs +++ b/src/NzbDrone.Core/ImportLists/ImportListSyncService.cs @@ -172,7 +172,7 @@ namespace NzbDrone.Core.ImportLists } // Check to see if book in DB - var existingAlbum = _bookService.FindById(report.EditionGoodreadsId); + var existingAlbum = _bookService.FindById(report.BookGoodreadsId); if (existingAlbum != null) { @@ -181,7 +181,7 @@ namespace NzbDrone.Core.ImportLists } // Check to see if book excluded - var excludedAlbum = listExclusions.SingleOrDefault(s => s.ForeignId == report.EditionGoodreadsId); + var excludedAlbum = listExclusions.SingleOrDefault(s => s.ForeignId == report.BookGoodreadsId); if (excludedAlbum != null) { @@ -199,7 +199,7 @@ namespace NzbDrone.Core.ImportLists } // Append Album if not already in DB or already on add list - if (albumsToAdd.All(s => s.ForeignBookId != report.EditionGoodreadsId)) + if (albumsToAdd.All(s => s.ForeignBookId != report.BookGoodreadsId)) { var monitored = importList.ShouldMonitor != ImportListMonitorType.None;