Bugfixes/misc (#196)

* Removed an error log statment which wasn't valid. Was showing error when a comicinfo.xml was not found in a directory.

* Fixed #191. Don't overwrite summary information if we already have something set from UI.

* Fixes #192

* Fixed #194 by moving the Take to after the query runs, so we take only distinct series.

* Added another case for Regex parsing for VanDread-v01-c01.zip
This commit is contained in:
Joseph Milazzo 2021-05-02 19:46:34 -05:00 committed by GitHub
parent e2e755145c
commit 9c43833989
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 17 deletions

View file

@ -350,27 +350,24 @@ namespace API.Data
.ToList();
series = series.Where(s => s.AppUserId == userId
&& s.PagesRead > 0
&& s.PagesRead <
s.Series.Pages -
1 // - 1 because when reading, we start at 0 then go to pages - 1. But when summing, pages assumes starting at 1
&& s.PagesRead < s.Series.Pages - 1 // - 1 because when reading, we start at 0 then go to pages - 1. But when summing, pages assumes starting at 1
&& userLibraries.Contains(s.Series.LibraryId));
}
else
{
series = series.Where(s => s.AppUserId == userId
&& s.PagesRead > 0
&& s.PagesRead <
(s.Series.Pages - 1) // - 1 because when reading, we start at 0 then go to pages - 1. But when summing, pages assumes starting at 1
&& (s.Series.LibraryId == libraryId));
&& s.PagesRead < s.Series.Pages - 1 // - 1 because when reading, we start at 0 then go to pages - 1. But when summing, pages assumes starting at 1
&& s.Series.LibraryId == libraryId);
}
var retSeries = await series.Take(limit)
var retSeries = await series
.OrderByDescending(s => s.LastModified)
.Select(s => s.Series)
.ProjectTo<SeriesDto>(_mapper.ConfigurationProvider)
.AsNoTracking()
.ToListAsync();
return retSeries.DistinctBy(s => s.Name);
return retSeries.DistinctBy(s => s.Name).Take(limit); // SeriesDTO might need date information
}
}
}