1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-17 21:26:13 -04:00

Display ratings when sorting on series posters index component

This commit is contained in:
Bogdan
2026-01-28 17:57:07 +02:00
committed by Mark McDowall
parent e8020b7289
commit f2fc1e9332
3 changed files with 15 additions and 0 deletions

View File

@@ -110,6 +110,7 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
added,
statistics = {} as Statistics,
images,
ratings,
tags,
} = series;
@@ -271,6 +272,7 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
timeFormat={timeFormat}
tags={tags}
showTags={showTags}
ratings={ratings}
/>
<EditSeriesModal

View File

@@ -1,6 +1,8 @@
import React from 'react';
import HeartRating from 'Components/HeartRating';
import SeriesTagList from 'Components/SeriesTagList';
import Language from 'Language/Language';
import { Ratings } from 'Series/Series';
import { QualityProfileModel } from 'Settings/Profiles/Quality/useQualityProfiles';
import formatDateTime from 'Utilities/Date/formatDateTime';
import getRelativeDate from 'Utilities/Date/getRelativeDate';
@@ -18,6 +20,7 @@ interface SeriesIndexPosterInfoProps {
seasonCount: number;
path: string;
sizeOnDisk?: number;
ratings: Ratings;
tags: number[];
sortKey: string;
showRelativeDates: boolean;
@@ -38,6 +41,7 @@ function SeriesIndexPosterInfo(props: SeriesIndexPosterInfoProps) {
seasonCount,
path,
sizeOnDisk = 0,
ratings,
tags,
sortKey,
showRelativeDates,
@@ -153,6 +157,14 @@ function SeriesIndexPosterInfo(props: SeriesIndexPosterInfoProps) {
);
}
if (sortKey === 'ratings' && ratings.value) {
return (
<div className={styles.info} title={translate('Rating')}>
<HeartRating rating={ratings.value} votes={ratings.votes} />
</div>
);
}
return null;
}

View File

@@ -158,6 +158,7 @@ export default function SeriesIndexPosters({
case 'added':
case 'path':
case 'sizeOnDisk':
case 'ratings':
heights.push(19);
break;
case 'qualityProfileId':