Fixed: bookshelf count and colour (#30)

* Add total book count to the result set from the statistics query

* Rename TotalTrackCount and map it

* Fix the colouring of the book count/percentage
This commit is contained in:
Thomas Mathews
2020-05-25 15:12:23 +01:00
committed by GitHub
parent 22679d6187
commit 324db4959d
2 changed files with 5 additions and 3 deletions

View File

@@ -9,5 +9,6 @@ namespace NzbDrone.Core.AuthorStats
public int BookFileCount { get; set; }
public int BookCount { get; set; }
public long SizeOnDisk { get; set; }
public int TotalBookCount { get; set; }
}
}

View File

@@ -6,10 +6,10 @@ namespace Readarr.Api.V1.Books
{
public int BookFileCount { get; set; }
public int BookCount { get; set; }
public int TotalTrackCount { get; set; }
public int TotalBookCount { get; set; }
public long SizeOnDisk { get; set; }
public decimal PercentOfTracks
public decimal PercentOfBooks
{
get
{
@@ -36,7 +36,8 @@ namespace Readarr.Api.V1.Books
{
BookFileCount = model.BookFileCount,
BookCount = model.BookCount,
SizeOnDisk = model.SizeOnDisk
SizeOnDisk = model.SizeOnDisk,
TotalBookCount = model.TotalBookCount
};
}
}