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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -9,5 +9,6 @@ public class BookStatistics : ResultSet
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 @@ public class BookStatisticsResource
{
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 @@ public static BookStatisticsResource ToResource(this BookStatistics model)
{
BookFileCount = model.BookFileCount,
BookCount = model.BookCount,
SizeOnDisk = model.SizeOnDisk
SizeOnDisk = model.SizeOnDisk,
TotalBookCount = model.TotalBookCount
};
}
}