Misc Changes (#2015)

* Updated ng-bootstrap

* Fixed an issue where jumpbar would be disabled when it shouldn't have been.

* When there are duplicate files that make up a volume, show the count on series detail.

* Added basic ISBN searching which will return a chapter back.
This commit is contained in:
Joe Milazzo 2023-05-26 13:34:23 -05:00 committed by GitHub
parent c57244abd1
commit a2f4bc712c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 53 additions and 51 deletions

View file

@ -348,11 +348,11 @@ public class SeriesRepository : ISeriesRepository
result.Series = _context.Series
.Where(s => libraryIds.Contains(s.LibraryId))
.Where(s => (EF.Functions.Like(s.Name, $"%{searchQuery}%")
.Where(s => EF.Functions.Like(s.Name, $"%{searchQuery}%")
|| (s.OriginalName != null && EF.Functions.Like(s.OriginalName, $"%{searchQuery}%"))
|| (s.LocalizedName != null && EF.Functions.Like(s.LocalizedName, $"%{searchQuery}%"))
|| (EF.Functions.Like(s.NormalizedName, $"%{searchQueryNormalized}%"))
|| (hasYearInQuery && s.Metadata.ReleaseYear == yearComparison)))
|| (hasYearInQuery && s.Metadata.ReleaseYear == yearComparison))
.RestrictAgainstAgeRestriction(userRating)
.Include(s => s.Library)
.OrderBy(s => s.SortName!.ToLower())
@ -430,7 +430,9 @@ public class SeriesRepository : ISeriesRepository
result.Chapters = await _context.Chapter
.Include(c => c.Files)
.Where(c => EF.Functions.Like(c.TitleName, $"%{searchQuery}%"))
.Where(c => EF.Functions.Like(c.TitleName, $"%{searchQuery}%")
|| EF.Functions.Like(c.ISBN, $"%{searchQuery}%")
)
.Where(c => c.Files.All(f => fileIds.Contains(f.Id)))
.AsSplitQuery()
.Take(maxRecords)

View file

@ -144,14 +144,4 @@ public static class Seed
}
await context.SaveChangesAsync();
}
// /// <summary>
// /// Responsible to copy (not overwrite) a set of favicons that Kavita can't parse from websites.
// /// </summary>
// /// <param name="directoryService"></param>
// /// <returns></returns>
// public static Task SeedFavicons(IDirectoryService directoryService)
// {
//
// }
}