Bugs from UX Overhaul (#3117)

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo 2024-08-17 18:07:56 -05:00 committed by GitHub
parent 3b915a8289
commit d4bcd354dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 479 additions and 637 deletions

View file

@ -44,6 +44,7 @@ public interface IVolumeRepository
Task<IEnumerable<Volume>> GetVolumes(int seriesId);
Task<Volume?> GetVolumeByIdAsync(int volumeId);
Task<IList<Volume>> GetAllWithCoversInDifferentEncoding(EncodeFormat encodeFormat);
Task<IEnumerable<string>> GetCoverImagesForLockedVolumesAsync();
}
public class VolumeRepository : IVolumeRepository
{
@ -252,4 +253,17 @@ public class VolumeRepository : IVolumeRepository
.Sum(p => p.PagesRead);
}
}
/// <summary>
/// Returns cover images for locked chapters
/// </summary>
/// <returns></returns>
public async Task<IEnumerable<string>> GetCoverImagesForLockedVolumesAsync()
{
return (await _context.Volume
.Where(c => c.CoverImageLocked)
.Select(c => c.CoverImage)
.Where(t => !string.IsNullOrEmpty(t))
.ToListAsync())!;
}
}