mirror of
https://github.com/seerr-team/seerr.git
synced 2025-12-23 23:58:07 -05:00
feat: add IMDb rating votes count in tooltip (#1696)
* feat: add IMDb rating votes count in tooltip * feat: add IMDb rating votes count in tooltip * feat: add IMDb rating votes count in tooltip
This commit is contained in:
@@ -145,6 +145,7 @@ export interface IMDBRating {
|
||||
title: string;
|
||||
url: string;
|
||||
criticsScore: number;
|
||||
criticsScoreCount: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,6 +188,7 @@ class IMDBRadarrProxy extends ExternalAPI {
|
||||
title: data[0].Title,
|
||||
url: `https://www.imdb.com/title/${data[0].ImdbId}`,
|
||||
criticsScore: data[0].MovieRatings.Imdb.Value,
|
||||
criticsScoreCount: data[0].MovieRatings.Imdb.Count,
|
||||
};
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
|
||||
@@ -99,7 +99,7 @@ const messages = defineMessages('components.MovieDetails', {
|
||||
rtcriticsscore: 'Rotten Tomatoes Tomatometer',
|
||||
rtaudiencescore: 'Rotten Tomatoes Audience Score',
|
||||
tmdbuserscore: 'TMDB User Score',
|
||||
imdbuserscore: 'IMDB User Score',
|
||||
imdbuserscore: 'IMDB User Score – votes: {formattedCount}',
|
||||
watchlistSuccess: '<strong>{title}</strong> added to watchlist successfully!',
|
||||
watchlistDeleted:
|
||||
'<strong>{title}</strong> Removed from watchlist successfully!',
|
||||
@@ -812,7 +812,18 @@ const MovieDetails = ({ movie }: MovieDetailsProps) => {
|
||||
</Tooltip>
|
||||
)}
|
||||
{ratingData?.imdb?.criticsScore && (
|
||||
<Tooltip content={intl.formatMessage(messages.imdbuserscore)}>
|
||||
<Tooltip
|
||||
content={intl.formatMessage(messages.imdbuserscore, {
|
||||
formattedCount: intl.formatNumber(
|
||||
ratingData.imdb.criticsScoreCount,
|
||||
{
|
||||
notation: 'compact',
|
||||
compactDisplay: 'short',
|
||||
maximumFractionDigits: 1,
|
||||
}
|
||||
),
|
||||
})}
|
||||
>
|
||||
<a
|
||||
href={ratingData.imdb.url}
|
||||
className="media-rating"
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
"components.MovieDetails.cast": "Cast",
|
||||
"components.MovieDetails.digitalrelease": "Digital Release",
|
||||
"components.MovieDetails.downloadstatus": "Download Status",
|
||||
"components.MovieDetails.imdbuserscore": "IMDB User Score",
|
||||
"components.MovieDetails.imdbuserscore": "IMDB User Score – votes: {formattedCount}",
|
||||
"components.MovieDetails.managemovie": "Manage Movie",
|
||||
"components.MovieDetails.mark4kavailable": "Mark as Available in 4K",
|
||||
"components.MovieDetails.markavailable": "Mark as Available",
|
||||
|
||||
Reference in New Issue
Block a user