Dashboard Customization Polish (#2295)
This commit is contained in:
parent
25e759d301
commit
25ffb2ffe1
42 changed files with 255 additions and 258 deletions
|
|
@ -51,7 +51,6 @@ public interface ILibraryRepository
|
|||
Task<bool> DoAnySeriesFoldersMatch(IEnumerable<string> folders);
|
||||
Task<string?> GetLibraryCoverImageAsync(int libraryId);
|
||||
Task<IList<string>> GetAllCoverImagesAsync();
|
||||
Task<IDictionary<int, LibraryType>> GetLibraryTypesForIdsAsync(IEnumerable<int> libraryIds);
|
||||
Task<IList<Library>> GetAllWithCoversInDifferentEncoding(EncodeFormat encodeFormat);
|
||||
Task<bool> GetAllowsScrobblingBySeriesId(int seriesId);
|
||||
}
|
||||
|
|
@ -346,28 +345,6 @@ public class LibraryRepository : ILibraryRepository
|
|||
.ToListAsync())!;
|
||||
}
|
||||
|
||||
public async Task<IDictionary<int, LibraryType>> GetLibraryTypesForIdsAsync(IEnumerable<int> libraryIds)
|
||||
{
|
||||
var types = await _context.Library
|
||||
.Where(l => libraryIds.Contains(l.Id))
|
||||
.AsNoTracking()
|
||||
.Select(l => new
|
||||
{
|
||||
LibraryId = l.Id,
|
||||
LibraryType = l.Type
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
var dict = new Dictionary<int, LibraryType>();
|
||||
|
||||
foreach (var type in types)
|
||||
{
|
||||
dict.TryAdd(type.LibraryId, type.LibraryType);
|
||||
}
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
public async Task<IList<Library>> GetAllWithCoversInDifferentEncoding(EncodeFormat encodeFormat)
|
||||
{
|
||||
var extension = encodeFormat.GetExtension();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue