Lots of Bugfixes (#2960)

Co-authored-by: Samuel Martins <s@smartins.ch>
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo 2024-05-22 06:58:23 -05:00 committed by GitHub
parent 97ffdd0975
commit b50fa0fd1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 563 additions and 282 deletions

View file

@ -1748,12 +1748,12 @@ public class SeriesRepository : ISeriesRepository
{
// This is due to v0.5.6 introducing bugs where we could have multiple series get duplicated and no way to delete them
// This here will delete the 2nd one as the first is the one to likely be used.
var sId = _context.Series
var sId = await _context.Series
.Where(s => s.Format == parsedSeries.Format && s.NormalizedName == parsedSeries.NormalizedName &&
s.LibraryId == libraryId)
.Select(s => s.Id)
.OrderBy(s => s)
.Last();
.LastAsync();
if (sId > 0)
{
ids.Add(sId);