mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-28 10:32:34 -04:00
Series Detail Enhancements (#983)
* Series Detail Enhancements # Added - Added: Volume tab for `Comic` Library Types - Added: Storyline tab for `Comic` and `Manga` library types. This will show Volumes and Chapters together sorted in order. # Changed - Changed: Changed `Chapters/Issues` to show all chapters or issues regardless of if they are in a volume for both `Manga` and `Comic` library types * Removed 3 loops to speed up load time * Refactored some library type checks. Reset selection on nav change. * Refactored hasReadingProgress for a series to the backend and further optimized the series detail page. * Fixed up the regex for "Annual" special case and added unit tests. Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ public interface IAppUserProgressRepository
|
||||
Task<int> CleanupAbandonedChapters();
|
||||
Task<bool> UserHasProgress(LibraryType libraryType, int userId);
|
||||
Task<AppUserProgress> GetUserProgressAsync(int chapterId, int userId);
|
||||
Task<bool> HasAnyProgressOnSeriesAsync(int seriesId, int userId);
|
||||
}
|
||||
|
||||
public class AppUserProgressRepository : IAppUserProgressRepository
|
||||
@@ -76,6 +77,12 @@ public class AppUserProgressRepository : IAppUserProgressRepository
|
||||
.AnyAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> HasAnyProgressOnSeriesAsync(int seriesId, int userId)
|
||||
{
|
||||
return await _context.AppUserProgresses
|
||||
.AnyAsync(aup => aup.PagesRead > 0 && aup.AppUserId == userId && aup.SeriesId == seriesId);
|
||||
}
|
||||
|
||||
public async Task<AppUserProgress> GetUserProgressAsync(int chapterId, int userId)
|
||||
{
|
||||
return await _context.AppUserProgresses
|
||||
|
||||
Reference in New Issue
Block a user