Massive UI Cleanup (#4466)

Co-authored-by: KindlyFire <10267586+kindlyfire@users.noreply.github.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Adam Havránek <adamhavra@seznam.cz>
Co-authored-by: Aindriú Mac Giolla Eoin <aindriu80@gmail.com>
Co-authored-by: Alexey <lewadedun@gmail.com>
Co-authored-by: Anon Bitardov <timurvolga23+weblate@gmail.com>
Co-authored-by: Ferran <ferrancette@gmail.com>
Co-authored-by: Gneb <goozi12345@gmail.com>
Co-authored-by: Robin Stolpe <robinstolpe@slashmad.com>
Co-authored-by: 안세훈 <on9686@gmail.com>
Co-authored-by: Tijl Van den Brugghen <contact@tijlvdb.me>
This commit is contained in:
Joe Milazzo
2026-02-28 13:19:00 -06:00
committed by GitHub
parent faae7fe402
commit 0bbb0ff28f
596 changed files with 14339 additions and 12501 deletions
@@ -37,6 +37,8 @@ public interface ILibraryRepository
void Update(Library library);
void Delete(Library? library);
Task<IEnumerable<LibraryDto>> GetLibraryDtosAsync();
Task<LibraryDto?> GetLibraryDtoByIdAsync(int libraryId);
Task<LiteLibraryDto?> GetLiteLibraryDtoByIdAsync(int libraryId);
Task<bool> LibraryExists(string libraryName);
Task<Library?> GetLibraryForIdAsync(int libraryId, LibraryIncludes includes = LibraryIncludes.None);
Task<IList<LibraryDto>> GetLibraryDtosForUsernameAsync(string userName);
@@ -214,6 +216,23 @@ public class LibraryRepository : ILibraryRepository
.ToListAsync();
}
public async Task<LibraryDto?> GetLibraryDtoByIdAsync(int libraryId)
{
return await _context.Library
.Include(f => f.Folders)
.Include(l => l.LibraryFileTypes)
.ProjectTo<LibraryDto>(_mapper.ConfigurationProvider)
.AsSplitQuery()
.FirstOrDefaultAsync(l => l.Id == libraryId);
}
public async Task<LiteLibraryDto?> GetLiteLibraryDtoByIdAsync(int libraryId)
{
return await _context.Library
.ProjectTo<LiteLibraryDto>(_mapper.ConfigurationProvider)
.FirstOrDefaultAsync(l => l.Id == libraryId);
}
public async Task<Library?> GetLibraryForIdAsync(int libraryId, LibraryIncludes includes = LibraryIncludes.None)
{