mirror of
https://github.com/Readarr/Readarr
synced 2026-05-08 12:42:51 +02:00
Fixed: Slow initial author load
This commit is contained in:
parent
404da4ae22
commit
996841db45
3 changed files with 5 additions and 4 deletions
|
|
@ -274,6 +274,7 @@ public AuthorResource EnsureAuthor(string authorId, string goodreadsBookId, stri
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
|
result.NextBook = result.LastBook = null;
|
||||||
Author.Put(result);
|
Author.Put(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -193,8 +193,8 @@ private void LinkNextPreviousBooks(params AuthorResource[] authors)
|
||||||
|
|
||||||
foreach (var authorResource in authors)
|
foreach (var authorResource in authors)
|
||||||
{
|
{
|
||||||
authorResource.NextBook = nextBooks.FirstOrDefault(x => x.AuthorMetadataId == authorResource.AuthorMetadataId).ToResource();
|
authorResource.NextBook = nextBooks.FirstOrDefault(x => x.AuthorMetadataId == authorResource.AuthorMetadataId);
|
||||||
authorResource.LastBook = lastBooks.FirstOrDefault(x => x.AuthorMetadataId == authorResource.AuthorMetadataId).ToResource();
|
authorResource.LastBook = lastBooks.FirstOrDefault(x => x.AuthorMetadataId == authorResource.AuthorMetadataId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ public class AuthorResource : RestResource
|
||||||
public string Disambiguation { get; set; }
|
public string Disambiguation { get; set; }
|
||||||
public List<Links> Links { get; set; }
|
public List<Links> Links { get; set; }
|
||||||
|
|
||||||
public BookResource NextBook { get; set; }
|
public Book NextBook { get; set; }
|
||||||
public BookResource LastBook { get; set; }
|
public Book LastBook { get; set; }
|
||||||
|
|
||||||
public List<MediaCover> Images { get; set; }
|
public List<MediaCover> Images { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue