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
|
@ -151,7 +151,7 @@ namespace API.Services
|
|||
IList<Volume> existingVolumes = _seriesRepository.GetVolumes(series.Id).ToList();
|
||||
foreach (var info in infos)
|
||||
{
|
||||
var existingVolume = existingVolumes.SingleOrDefault(v => v.Number == info.Volumes);
|
||||
var existingVolume = existingVolumes.SingleOrDefault(v => v.Name == info.Volumes);
|
||||
if (existingVolume != null)
|
||||
{
|
||||
// Temp let's overwrite all files (we need to enhance to update files)
|
||||
|
@ -168,7 +168,8 @@ namespace API.Services
|
|||
{
|
||||
var vol = new Volume()
|
||||
{
|
||||
Number = info.Volumes,
|
||||
Name = info.Volumes,
|
||||
Number = Int32.Parse(info.Volumes),
|
||||
Files = new List<MangaFile>()
|
||||
{
|
||||
new MangaFile()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue