🐛 Fix small things in MediaModal

This commit is contained in:
Thomas Camlong
2023-09-03 17:28:16 +02:00
parent 693f29bb82
commit 96e0394724

View File

@@ -57,7 +57,7 @@ export const MovieModal = ({ opened, closeModal }: MovieModalProps) => {
title={ title={
<Group> <Group>
<Image src={integration.image} width={30} height={30} alt={`${integration.label} icon`} /> <Image src={integration.image} width={30} height={30} alt={`${integration.label} icon`} />
<Title order={4}>{integration.label} movies</Title> <Title order={4}>{integration.label} search</Title>
</Group> </Group>
} }
> >
@@ -133,9 +133,9 @@ const MovieDisplay = ({ movie, type }: MovieDisplayProps) => {
} }
const service = config.apps.find((service) => service.integration.type === type); const service = config.apps.find((service) => service.integration.type === type);
const mediaUrl = movie.mediaInfo?.plexUrl ?? movie.mediaInfo?.mediaUrl; const mediaUrl = movie.mediaInfo?.plexUrl ?? movie.mediaInfo?.mediaUrl;
const serviceUrl = service?.behaviour.externalUrl ? service.behaviour.externalUrl : service?.url; const serviceUrl = service?.behaviour.externalUrl ? service.behaviour.externalUrl : service?.url;
const externalUrl = movie.mediaInfo?.serviceUrl;
return ( return (
<Card withBorder> <Card withBorder>
@@ -196,12 +196,12 @@ const MovieDisplay = ({ movie, type }: MovieDisplayProps) => {
<Button <Button
component="a" component="a"
target="_blank" target="_blank"
href={serviceUrl} href={externalUrl}
variant="outline" variant="outline"
size="sm" size="sm"
rightIcon={<IconExternalLink size={15} />} rightIcon={<IconExternalLink size={15} />}
> >
TMDb {type === 'jellyseerr' ? 'Jellyfin' : 'Overseerr'}
</Button> </Button>
)} )}
</Group> </Group>