mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 14:25:17 -04:00
Custom keybinds, Default language per Library, and bugfixes (#4162)
Co-authored-by: Joseph Milazzo <josephmajora@gmail.com>
This commit is contained in:
@@ -49,6 +49,7 @@ public interface IPersonRepository
|
||||
Task<IList<PersonDto>> GetAllPeopleDtosForLibrariesAsync(int userId, List<int>? libraryIds = null, PersonIncludes includes = PersonIncludes.None);
|
||||
|
||||
Task<string?> GetCoverImageAsync(int personId);
|
||||
Task<IList<string?>> GetAllCoverImagesAsync();
|
||||
Task<string?> GetCoverImageByNameAsync(string name);
|
||||
Task<IEnumerable<PersonRole>> GetRolesForPersonByName(int personId, int userId);
|
||||
Task<PagedList<BrowsePersonDto>> GetBrowsePersonDtos(int userId, BrowsePersonFilterDto filter, UserParams userParams);
|
||||
@@ -167,6 +168,13 @@ public class PersonRepository : IPersonRepository
|
||||
.SingleOrDefaultAsync();
|
||||
}
|
||||
|
||||
public async Task<IList<string?>> GetAllCoverImagesAsync()
|
||||
{
|
||||
return await _context.Person
|
||||
.Select(p => p.CoverImage)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<string?> GetCoverImageByNameAsync(string name)
|
||||
{
|
||||
var normalized = name.ToNormalized();
|
||||
@@ -358,7 +366,8 @@ public class PersonRepository : IPersonRepository
|
||||
.Select(cp => cp.Chapter)
|
||||
.RestrictAgainstAgeRestriction(ageRating)
|
||||
.RestrictByLibrary(userLibs)
|
||||
.OrderBy(ch => ch.SortOrder)
|
||||
.OrderBy(ch => ch.Volume.MinNumber) // Group/Sort volumes as well
|
||||
.ThenBy(ch => ch.SortOrder)
|
||||
.Take(20)
|
||||
.ProjectTo<StandaloneChapterDto>(_mapper.ConfigurationProvider)
|
||||
.ToListAsync();
|
||||
|
||||
Reference in New Issue
Block a user