From e032e385a5253d215490255c676f42ee48f39428 Mon Sep 17 00:00:00 2001 From: sct Date: Fri, 30 Oct 2020 14:48:10 +0000 Subject: [PATCH] fix: dont cross import SyncStatus type --- server/job/plexsync.ts | 2 +- src/components/Settings/SettingsPlex.tsx | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/server/job/plexsync.ts b/server/job/plexsync.ts index b35f7160c..9b9ebc13c 100644 --- a/server/job/plexsync.ts +++ b/server/job/plexsync.ts @@ -13,7 +13,7 @@ const imdbRegex = new RegExp(/imdb:\/\/(tt[0-9]+)/); const tmdbRegex = new RegExp(/tmdb:\/\/([0-9]+)/); const plexRegex = new RegExp(/plex:\/\//); -export interface SyncStatus { +interface SyncStatus { running: boolean; progress: number; total: number; diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx index abe02878d..01d2c21f3 100644 --- a/src/components/Settings/SettingsPlex.tsx +++ b/src/components/Settings/SettingsPlex.tsx @@ -1,7 +1,6 @@ import React, { useState } from 'react'; import LoadingSpinner from '../Common/LoadingSpinner'; import type { PlexSettings } from '../../../server/lib/settings'; -import type { SyncStatus } from '../../../server/job/plexsync'; import useSWR from 'swr'; import { useFormik } from 'formik'; import Button from '../Common/Button'; @@ -35,6 +34,20 @@ const messages = defineMessages({ cancelscan: 'Cancel Scan', }); +interface Library { + id: string; + name: string; + enabled: boolean; +} + +interface SyncStatus { + running: boolean; + progress: number; + total: number; + currentLibrary: Library; + libraries: Library[]; +} + const SettingsPlex: React.FC = () => { const intl = useIntl(); const { data, error, revalidate } = useSWR(