From 15f9ae3c13d2b9a28b8cdb4111c8d10067874563 Mon Sep 17 00:00:00 2001 From: ta264 Date: Wed, 1 Jul 2020 22:01:52 +0100 Subject: [PATCH] Log progress while fetching books --- .../MetadataSource/Goodreads/GoodreadsProxy.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/MetadataSource/Goodreads/GoodreadsProxy.cs b/src/NzbDrone.Core/MetadataSource/Goodreads/GoodreadsProxy.cs index 000948247..ef0de72b7 100644 --- a/src/NzbDrone.Core/MetadataSource/Goodreads/GoodreadsProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/Goodreads/GoodreadsProxy.cs @@ -8,6 +8,7 @@ using NLog; using NzbDrone.Common.Cache; using NzbDrone.Common.Extensions; using NzbDrone.Common.Http; +using NzbDrone.Common.Instrumentation.Extensions; using NzbDrone.Core.Books; using NzbDrone.Core.Exceptions; using NzbDrone.Core.Http; @@ -127,7 +128,11 @@ namespace NzbDrone.Core.MetadataSource.Goodreads var author = GetAuthorInfo(foreignAuthorId); var bookList = GetAuthorBooks(foreignAuthorId, minPopularity); - var books = bookList.Select(x => GetBookInfo(x.Editions.Value.First().ForeignEditionId).Item2).ToList(); + var books = bookList.Select((x, i) => + { + _logger.ProgressDebug($"{author}: Fetching book {i}/{bookList.Count}"); + return GetBookInfo(x.Editions.Value.First().ForeignEditionId).Item2; + }).ToList(); var existingAuthor = _authorService.FindById(foreignAuthorId); if (existingAuthor != null)