mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-06 06:45:18 -04:00
Bugs from UX Overhaul (#3117)
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
@@ -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())!;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user