Fixed a bug where CBR Rating had no link.
This commit is contained in:
parent
d78240cd03
commit
7332319824
3 changed files with 8 additions and 5 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -485,6 +485,7 @@ public class ExternalMetadataService : IExternalMetadataService
|
|||
{
|
||||
var rating = _mapper.Map<ExternalRating>(r);
|
||||
rating.SeriesId = externalSeriesMetadata.SeriesId;
|
||||
rating.ProviderUrl = r.ProviderUrl;
|
||||
return rating;
|
||||
}).ToList();
|
||||
|
||||
|
|
|
|||
|
|
@ -64,9 +64,11 @@
|
|||
</ng-template>
|
||||
|
||||
<ng-template #externalPopContent let-rating="rating">
|
||||
<div>
|
||||
<i class="fa-solid fa-heart" aria-hidden="true"></i> {{rating.favoriteCount}}
|
||||
</div>
|
||||
@if (rating.favoriteCount > 0) {
|
||||
<div>
|
||||
<i class="fa-solid fa-heart" aria-hidden="true"></i> {{rating.favoriteCount}}
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (rating.providerUrl) {
|
||||
<a [href]="rating.providerUrl" target="_blank" rel="noreferrer nofollow">{{t('entry-label')}}</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue