Progress Overhaul + Profile Page and a LOT more! (#4262)

Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com>
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo
2025-12-09 10:00:11 -07:00
committed by GitHub
parent 4ac13f1f25
commit 9f29fa593d
645 changed files with 25585 additions and 4805 deletions
+1 -3
View File
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading.Tasks;
using API.DTOs;
@@ -8,10 +7,8 @@ using API.Entities;
using API.Entities.Enums;
using API.Extensions;
using API.Extensions.QueryExtensions;
using API.Services;
using AutoMapper;
using AutoMapper.QueryableExtensions;
using Kavita.Common;
using Microsoft.EntityFrameworkCore;
namespace API.Data.Repositories;
@@ -262,6 +259,7 @@ public class VolumeRepository : IVolumeRepository
var progresses = userProgress.Where(p => p.ChapterId == c.Id).ToList();
if (progresses.Count == 0) continue;
c.PagesRead = progresses.Sum(p => p.PagesRead);
c.TotalReads = progresses.Min(p => p.TotalReads);
c.LastReadingProgressUtc = progresses.Max(p => p.LastModifiedUtc);
c.LastReadingProgress = progresses.Max(p => p.LastModified);
}