Download Support (#298)
* Implemented the ability to download files (series, volume, chapter) * Added RBS checks to ensure user is either an admin or has download role * Added the ability to change a users feature RBS. Changed the Role seed to use reflection
This commit is contained in:
parent
4ae9f078b0
commit
16a77fa8d6
17 changed files with 262 additions and 45 deletions
|
@ -411,5 +411,16 @@ namespace API.Data
|
|||
|
||||
return await PagedList<SeriesDto>.CreateAsync(query, userParams.PageNumber, userParams.PageSize);
|
||||
}
|
||||
|
||||
public async Task<IList<MangaFile>> GetFilesForSeries(int seriesId)
|
||||
{
|
||||
return await _context.Volume
|
||||
.Where(v => v.SeriesId == seriesId)
|
||||
.Include(v => v.Chapters)
|
||||
.ThenInclude(c => c.Files)
|
||||
.SelectMany(v => v.Chapters.SelectMany(c => c.Files))
|
||||
.AsNoTracking()
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue