mirror of
https://github.com/Readarr/Readarr
synced 2026-05-01 09:11:03 +02:00
Fixed: Don't accidentally remove book editions when refreshing a book
This commit is contained in:
parent
8ec13f5ead
commit
8bc44f2a29
1 changed files with 7 additions and 0 deletions
|
|
@ -87,6 +87,13 @@ private Author GetSkyhookData(Book book)
|
|||
newbook.AuthorMetadataId = book.AuthorMetadataId;
|
||||
newbook.AuthorMetadata.Value.Id = book.AuthorMetadataId;
|
||||
|
||||
// make sure to grab editions data for any other existing editions
|
||||
foreach (var edition in book.Editions.Value.Skip(1))
|
||||
{
|
||||
tuple = _bookInfo.GetBookInfo(edition.ForeignEditionId, false);
|
||||
newbook.Editions.Value.AddRange(tuple.Item2.Editions.Value);
|
||||
}
|
||||
|
||||
author.Books = new List<Book> { newbook };
|
||||
return author;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue