Misc UI Tweaks (#1692)
* Added a timeAgo pipe which shows live updates for a few areas. * Fixed some wording on stats page. Changed Total People count to just work on distinct names and not count multiple for different roles. * Tweaked the compact number so it only shows one decimal * Fixed a bug
This commit is contained in:
parent
20441f5ec3
commit
4548dcb1eb
9 changed files with 155 additions and 7 deletions
|
@ -240,13 +240,21 @@ public class StatisticService : IStatisticService
|
|||
.ProjectTo<SeriesDto>(_mapper.ConfigurationProvider)
|
||||
.AsEnumerable();
|
||||
|
||||
var distinctPeople = _context.Person
|
||||
.AsSplitQuery()
|
||||
.AsEnumerable()
|
||||
.GroupBy(sm => sm.NormalizedName)
|
||||
.Select(sm => sm.Key)
|
||||
.Distinct()
|
||||
.Count();
|
||||
|
||||
return new ServerStatistics()
|
||||
{
|
||||
ChapterCount = await _context.Chapter.CountAsync(),
|
||||
SeriesCount = await _context.Series.CountAsync(),
|
||||
TotalFiles = await _context.MangaFile.CountAsync(),
|
||||
TotalGenres = await _context.Genre.CountAsync(),
|
||||
TotalPeople = await _context.Person.CountAsync(),
|
||||
TotalPeople = distinctPeople,
|
||||
TotalSize = await _context.MangaFile.SumAsync(m => m.Bytes),
|
||||
TotalTags = await _context.Tag.CountAsync(),
|
||||
VolumeCount = await _context.Volume.Where(v => v.Number != 0).CountAsync(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue