File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,8 +12,10 @@ import useSettings from '@app/hooks/useSettings';
1212import { MediaType } from '@server/constants/media' ;
1313import { MediaServerType } from '@server/constants/server' ;
1414
15+ type ExternalLinkType = 'movie' | 'tv' | 'person' ;
16+
1517interface ExternalLinkBlockProps {
16- mediaType : 'movie' | 'tv' ;
18+ mediaType : ExternalLinkType ;
1719 tmdbId ?: number ;
1820 tvdbId ?: number ;
1921 imdbId ?: string ;
@@ -71,7 +73,7 @@ const ExternalLinkBlock = ({
7173 < TvdbLogo />
7274 </ a >
7375 ) }
74- { imdbId && (
76+ { imdbId && mediaType !== 'person' && (
7577 < a
7678 href = { `https://www.imdb.com/title/${ imdbId } ` }
7779 className = "w-8 opacity-50 transition duration-300 hover:opacity-100"
@@ -81,6 +83,16 @@ const ExternalLinkBlock = ({
8183 < ImdbLogo />
8284 </ a >
8385 ) }
86+ { imdbId && mediaType === 'person' && (
87+ < a
88+ href = { `https://www.imdb.com/name/${ imdbId } ` }
89+ className = "w-8 opacity-50 transition duration-300 hover:opacity-100"
90+ target = "_blank"
91+ rel = "noreferrer"
92+ >
93+ < ImdbLogo />
94+ </ a >
95+ ) }
8496 { rtUrl && (
8597 < a
8698 href = { rtUrl }
@@ -91,7 +103,7 @@ const ExternalLinkBlock = ({
91103 < RTLogo />
92104 </ a >
93105 ) }
94- { tmdbId && (
106+ { tmdbId && mediaType !== 'person' && (
95107 < a
96108 href = { `https://trakt.tv/search/tmdb/${ tmdbId } ?id_type=${
97109 mediaType === 'movie' ? 'movie' : 'show'
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import CachedImage from '@app/components/Common/CachedImage';
33import ImageFader from '@app/components/Common/ImageFader' ;
44import LoadingSpinner from '@app/components/Common/LoadingSpinner' ;
55import PageTitle from '@app/components/Common/PageTitle' ;
6+ import ExternalLinkBlock from '@app/components/ExternalLinkBlock' ;
67import TitleCard from '@app/components/TitleCard' ;
78import globalMessages from '@app/i18n/globalMessages' ;
89import ErrorPage from '@app/pages/_error' ;
@@ -277,6 +278,15 @@ const PersonDetails = () => {
277278 { mediaTypePicker }
278279 </ div >
279280 </ div >
281+ < div className = "flex w-full items-center justify-center lg:justify-between" >
282+ < div className = "mb-3 mt-3" >
283+ < ExternalLinkBlock
284+ mediaType = "person"
285+ tmdbId = { data . id }
286+ imdbId = { data . imdbId }
287+ />
288+ </ div >
289+ </ div >
280290 < div className = "mb-2 mt-1 space-y-1 text-xs text-white sm:text-sm lg:text-base" >
281291 < div > { personAttributes . join ( ' | ' ) } </ div >
282292 { ( data . alsoKnownAs ?? [ ] ) . length > 0 && (
You can’t perform that action at this time.
0 commit comments