Need to work out the rules with the community but basic metadata is done, just need the people.

This commit is contained in:
Joseph Milazzo 2025-03-18 17:42:58 -05:00
parent 585df0b5d3
commit 3557dba465
4 changed files with 79 additions and 7 deletions

View file

@ -47,6 +47,7 @@ public interface IChapterRepository
Task<IEnumerable<string>> GetCoverImagesForLockedChaptersAsync();
Task<ChapterDto> AddChapterModifiers(int userId, ChapterDto chapter);
IEnumerable<Chapter> GetChaptersForSeries(int seriesId);
Task<IList<Chapter>> GetAllChaptersForSeries(int seriesId);
}
public class ChapterRepository : IChapterRepository
{
@ -298,4 +299,13 @@ public class ChapterRepository : IChapterRepository
.Include(c => c.Volume)
.AsEnumerable();
}
public async Task<IList<Chapter>> GetAllChaptersForSeries(int seriesId)
{
return await _context.Chapter
.Where(c => c.Volume.SeriesId == seriesId)
.OrderBy(c => c.SortOrder)
.Include(c => c.Volume)
.ToListAsync();
}
}