Refactored Volume to have Name and Number (int) so that we can properly sort and still handle possible split volumes.
Refactored ScanLibrary into Library controller and updated it so it adds the new library to all admins.
This commit is contained in:
parent
d632e53f18
commit
9168e12483
13 changed files with 622 additions and 49 deletions
|
@ -50,6 +50,7 @@ namespace API.Data
|
|||
{
|
||||
return await _context.Series
|
||||
.Where(series => series.LibraryId == libraryId)
|
||||
.OrderBy(s => s.SortName)
|
||||
.ProjectTo<SeriesDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
|
@ -57,6 +58,7 @@ namespace API.Data
|
|||
{
|
||||
return await _context.Volume
|
||||
.Where(vol => vol.SeriesId == seriesId)
|
||||
.OrderBy(volume => volume.Number)
|
||||
.ProjectTo<VolumeDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
|
@ -64,6 +66,7 @@ namespace API.Data
|
|||
{
|
||||
return _context.Volume
|
||||
.Where(vol => vol.SeriesId == seriesId)
|
||||
.OrderBy(vol => vol.Number)
|
||||
.ProjectTo<VolumeDto>(_mapper.ConfigurationProvider).ToList();
|
||||
}
|
||||
|
||||
|
@ -71,6 +74,7 @@ namespace API.Data
|
|||
{
|
||||
return _context.Volume
|
||||
.Where(vol => vol.SeriesId == seriesId)
|
||||
.OrderBy(vol => vol.Number)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue