Fixed: Reinstate total book count in author stats

pull/1064/head
ta264 3 years ago
parent fe13823b43
commit 3ab29eee60

@ -7,6 +7,7 @@ namespace NzbDrone.Core.AuthorStats
{
public int AuthorId { get; set; }
public int BookCount { get; set; }
public int TotalBookCount { get; set; }
public int BookFileCount { get; set; }
public long SizeOnDisk { get; set; }
public List<BookStatistics> BookStatistics { get; set; }

@ -58,6 +58,7 @@ namespace NzbDrone.Core.AuthorStats
{
BookStatistics = bookStatistics,
BookCount = bookStatistics.Sum(s => s.BookCount),
TotalBookCount = bookStatistics.Sum(s => s.TotalBookCount),
AuthorId = bookStatistics.First().AuthorId,
BookFileCount = bookStatistics.Sum(s => s.BookFileCount),
SizeOnDisk = bookStatistics.Sum(s => s.SizeOnDisk)

@ -35,6 +35,7 @@ namespace Readarr.Api.V1.Author
return new AuthorStatisticsResource
{
BookCount = model.BookCount,
TotalBookCount = model.TotalBookCount,
BookFileCount = model.BookFileCount,
SizeOnDisk = model.SizeOnDisk
};

Loading…
Cancel
Save