New: Use Goodreads directly, allow multiple editions of a book (new DB required)

This commit is contained in:
ta264
2020-06-30 21:46:01 +01:00
parent d83d2548e5
commit 45d49117ca
178 changed files with 3332 additions and 1786 deletions
@@ -129,13 +129,13 @@ namespace NzbDrone.Core.Books
var existing = existingByAuthor.Concat(existingBySeries).GroupBy(x => x.ForeignSeriesId).Select(x => x.First()).ToList();
var books = _bookService.GetBooksByAuthorMetadataId(authorMetadataId);
var bookDict = books.ToDictionary(x => x.ForeignWorkId);
var bookDict = books.ToDictionary(x => x.ForeignBookId);
var links = new List<SeriesBookLink>();
foreach (var s in remoteData.Series.Value)
{
s.LinkItems.Value.ForEach(x => x.Series = s);
links.AddRange(s.LinkItems.Value.Where(x => bookDict.ContainsKey(x.Book.Value.ForeignWorkId)));
links.AddRange(s.LinkItems.Value.Where(x => bookDict.ContainsKey(x.Book.Value.ForeignBookId)));
}
var grouped = links.GroupBy(x => x.Series.Value);