From 8bc44f2a29d10223c3556d3a24cad8db3b0b2617 Mon Sep 17 00:00:00 2001 From: ta264 Date: Tue, 30 Mar 2021 21:24:41 +0100 Subject: [PATCH] Fixed: Don't accidentally remove book editions when refreshing a book --- src/NzbDrone.Core/Books/Services/RefreshBookService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/NzbDrone.Core/Books/Services/RefreshBookService.cs b/src/NzbDrone.Core/Books/Services/RefreshBookService.cs index cf1f8a56c..1781adfac 100644 --- a/src/NzbDrone.Core/Books/Services/RefreshBookService.cs +++ b/src/NzbDrone.Core/Books/Services/RefreshBookService.cs @@ -87,6 +87,13 @@ namespace NzbDrone.Core.Books 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 { newbook }; return author; }