Custom keybinds, Default language per Library, and bugfixes (#4162)

Co-authored-by: Joseph Milazzo <josephmajora@gmail.com>
This commit is contained in:
Fesaa
2025-11-01 15:56:00 +01:00
committed by GitHub
parent f9280f6861
commit 2c6eddfebb
72 changed files with 6038 additions and 441 deletions
+10 -1
View File
@@ -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();