Kavita+ Comic Metadata Matching (#3740)
This commit is contained in:
parent
4521965315
commit
ed154e4768
46 changed files with 4207 additions and 98 deletions
|
|
@ -47,6 +47,7 @@ public interface IChapterRepository
|
|||
Task<IEnumerable<string>> GetCoverImagesForLockedChaptersAsync();
|
||||
Task<ChapterDto> AddChapterModifiers(int userId, ChapterDto chapter);
|
||||
IEnumerable<Chapter> GetChaptersForSeries(int seriesId);
|
||||
Task<IList<Chapter>> GetAllChaptersForSeries(int seriesId);
|
||||
}
|
||||
public class ChapterRepository : IChapterRepository
|
||||
{
|
||||
|
|
@ -298,4 +299,15 @@ public class ChapterRepository : IChapterRepository
|
|||
.Include(c => c.Volume)
|
||||
.AsEnumerable();
|
||||
}
|
||||
|
||||
public async Task<IList<Chapter>> GetAllChaptersForSeries(int seriesId)
|
||||
{
|
||||
return await _context.Chapter
|
||||
.Where(c => c.Volume.SeriesId == seriesId)
|
||||
.OrderBy(c => c.SortOrder)
|
||||
.Include(c => c.Volume)
|
||||
.Include(c => c.People)
|
||||
.ThenInclude(cp => cp.Person)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,8 +157,8 @@ public class ExternalSeriesMetadataRepository : IExternalSeriesMetadataRepositor
|
|||
.OrderByDescending(r => r.Score);
|
||||
}
|
||||
|
||||
IEnumerable<RatingDto> ratings = new List<RatingDto>();
|
||||
if (seriesDetailDto.ExternalRatings != null && seriesDetailDto.ExternalRatings.Any())
|
||||
IEnumerable<RatingDto> ratings = [];
|
||||
if (seriesDetailDto.ExternalRatings != null && seriesDetailDto.ExternalRatings.Count != 0)
|
||||
{
|
||||
ratings = seriesDetailDto.ExternalRatings
|
||||
.Select(r => _mapper.Map<RatingDto>(r));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue