mirror of
https://github.com/Readarr/Readarr
synced 2026-04-25 06:10:57 +02:00
Fixed: Import list import error
This commit is contained in:
parent
515751b1e1
commit
220808a7c4
2 changed files with 6 additions and 5 deletions
|
|
@ -43,6 +43,7 @@ public void SetUp()
|
|||
.Returns<int>(x => Builder<Book>
|
||||
.CreateListOfSize(1)
|
||||
.TheFirst(1)
|
||||
.With(b => b.ForeignBookId = "4321")
|
||||
.With(b => b.Editions = Builder<Edition>
|
||||
.CreateListOfSize(1)
|
||||
.TheFirst(1)
|
||||
|
|
@ -84,7 +85,7 @@ private void WithAuthorId()
|
|||
|
||||
private void WithBookId()
|
||||
{
|
||||
_importListReports.First().EditionGoodreadsId = "101";
|
||||
_importListReports.First().EditionGoodreadsId = "1234";
|
||||
}
|
||||
|
||||
private void WithExistingArtist()
|
||||
|
|
@ -122,7 +123,7 @@ private void WithExcludedAlbum()
|
|||
{
|
||||
new ImportListExclusion
|
||||
{
|
||||
ForeignId = "101"
|
||||
ForeignId = "4321"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ private void ProcessAlbumReport(ImportListDefinition importList, ImportListItemI
|
|||
}
|
||||
|
||||
// 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 @@ private void ProcessAlbumReport(ImportListDefinition importList, ImportListItemI
|
|||
}
|
||||
|
||||
// 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 @@ private void ProcessAlbumReport(ImportListDefinition importList, ImportListItemI
|
|||
}
|
||||
|
||||
// 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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue