feat(person): add tmdb- and imdb link on person detail page (#2136)

Signed-off-by: Florian Hoech <code@florians-web.de>
This commit is contained in:
bogo22
2026-03-21 00:52:31 +01:00
committed by GitHub
parent eaf397a021
commit fb2ee7ca7c
2 changed files with 25 additions and 3 deletions

View File

@@ -12,8 +12,10 @@ import useSettings from '@app/hooks/useSettings';
import { MediaType } from '@server/constants/media';
import { MediaServerType } from '@server/constants/server';
type ExternalLinkType = 'movie' | 'tv' | 'person';
interface ExternalLinkBlockProps {
mediaType: 'movie' | 'tv';
mediaType: ExternalLinkType;
tmdbId?: number;
tvdbId?: number;
imdbId?: string;
@@ -71,7 +73,7 @@ const ExternalLinkBlock = ({
<TvdbLogo />
</a>
)}
{imdbId && (
{imdbId && mediaType !== 'person' && (
<a
href={`https://www.imdb.com/title/${imdbId}`}
className="w-8 opacity-50 transition duration-300 hover:opacity-100"
@@ -81,6 +83,16 @@ const ExternalLinkBlock = ({
<ImdbLogo />
</a>
)}
{imdbId && mediaType === 'person' && (
<a
href={`https://www.imdb.com/name/${imdbId}`}
className="w-8 opacity-50 transition duration-300 hover:opacity-100"
target="_blank"
rel="noreferrer"
>
<ImdbLogo />
</a>
)}
{rtUrl && (
<a
href={rtUrl}
@@ -91,7 +103,7 @@ const ExternalLinkBlock = ({
<RTLogo />
</a>
)}
{tmdbId && (
{tmdbId && mediaType !== 'person' && (
<a
href={`https://trakt.tv/search/tmdb/${tmdbId}?id_type=${
mediaType === 'movie' ? 'movie' : 'show'