mirror of
https://github.com/Readarr/Readarr
synced 2026-01-06 07:40:49 +01:00
Log progress while fetching books
This commit is contained in:
parent
5ef55d2180
commit
15f9ae3c13
1 changed files with 6 additions and 1 deletions
|
|
@ -8,6 +8,7 @@
|
|||
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 @@ public Author GetAuthorAndBooks(string foreignAuthorId, double minPopularity = 0
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue