🚧 WIP on Overseerr integration

This commit is contained in:
ajnart
2022-07-24 23:18:01 +02:00
parent 1f2d560893
commit a3f5b252b9
12 changed files with 182 additions and 119 deletions

View File

@@ -17,7 +17,6 @@ import {
Tooltip,
} from '@mantine/core';
import { useForm } from '@mantine/form';
import { useDebouncedValue } from '@mantine/hooks';
import { IconApps as Apps } from '@tabler/icons';
import { useEffect, useState } from 'react';
import { v4 as uuidv4 } from 'uuid';
@@ -249,6 +248,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
{(form.values.type === 'Sonarr' ||
form.values.type === 'Radarr' ||
form.values.type === 'Lidarr' ||
form.values.type === 'Overseerr' ||
form.values.type === 'Readarr') && (
<>
<TextInput

View File

@@ -1,24 +0,0 @@
import { Card } from '@mantine/core';
import { MediaDisplay } from '../calendar/MediaDisplay';
export default function OverseerrMediaDisplay(props: any) {
const { media }: { media: any } = props;
return (
<Card shadow="xl" withBorder>
<MediaDisplay
style={{
width: 600,
}}
media={{
title: media.name ?? media.originalTitle,
overview: media.overview,
poster: `https://image.tmdb.org/t/p/w600_and_h900_bestv2/${media.posterPath}`,
genres: [`score: ${media.voteAverage}/10`],
seasonNumber: media.mediaInfo?.seasons.length,
plexUrl: media.mediaInfo?.plexUrl,
imdbId: media.mediaInfo?.imdbId,
}}
/>
</Card>
);
}

View File

@@ -1,72 +0,0 @@
{
"id": 86831,
"firstAirDate": "2019-03-15",
"genreIds": [
16,
10765
],
"mediaType": "tv",
"name": "Love, Death & Robots",
"originCountry": [
"US"
],
"originalLanguage": "en",
"originalName": "Love, Death & Robots",
"overview": "Terrifying creatures, wicked surprises and dark comedy converge in this NSFW anthology of animated stories presented by Tim Miller and David Fincher.",
"popularity": 623.833,
"voteAverage": 8.2,
"voteCount": 1720,
"backdropPath": "/78NtUwwo3lhH7QGh4vG3U1qK1mc.jpg",
"posterPath": "/cRiDlzzZC5lL7fvImuSjs04SUIJ.jpg",
"mediaInfo": {
"downloadStatus": [],
"downloadStatus4k": [],
"id": 79,
"mediaType": "tv",
"tmdbId": 86831,
"tvdbId": 357888,
"imdbId": null,
"status": 4,
"status4k": 1,
"createdAt": "2022-02-05T04:30:01.000Z",
"updatedAt": "2022-02-05T09:25:22.000Z",
"lastSeasonChange": "2022-02-05T04:30:01.000Z",
"mediaAddedAt": "2022-02-04T01:16:35.000Z",
"serviceId": 0,
"serviceId4k": null,
"externalServiceId": 7,
"externalServiceId4k": null,
"externalServiceSlug": "love-death-and-robots",
"externalServiceSlug4k": null,
"ratingKey": "182",
"ratingKey4k": null,
"seasons": [
{
"id": 11,
"seasonNumber": 1,
"status": 1,
"status4k": 1,
"createdAt": "2022-02-05T04:30:01.000Z",
"updatedAt": "2022-02-05T04:30:01.000Z"
},
{
"id": 24,
"seasonNumber": 2,
"status": 5,
"status4k": 1,
"createdAt": "2022-02-05T04:30:01.000Z",
"updatedAt": "2022-02-05T04:30:01.000Z"
},
{
"id": 85,
"seasonNumber": 3,
"status": 3,
"status4k": 1,
"createdAt": "2022-04-26T04:30:02.000Z",
"updatedAt": "2022-04-26T04:30:02.000Z"
}
],
"plexUrl": "https://app.plex.tv/desktop#!/server/5b88b3c20d2d092c0ee848f9044f3f3bee033d91/details?key=%2Flibrary%2Fmetadata%2F182",
"serviceUrl": "http://server:8989/series/love-death-and-robots"
}
}