style: replaced Overseerr with jellyseerr

This commit is contained in:
Fallenbagel
2022-04-13 13:17:53 +05:00
parent 84f488be06
commit 57cc48a699
55 changed files with 360 additions and 483 deletions

View File

@@ -60,9 +60,8 @@ const CollectionDetails: React.FC<CollectionDetailsProps> = ({
}
);
const { data: genres } = useSWR<{ id: number; name: string }[]>(
`/api/v1/genres/movie`
);
const { data: genres } =
useSWR<{ id: number; name: string }[]>(`/api/v1/genres/movie`);
if (!data && !error) {
return <LoadingSpinner />;

View File

@@ -35,13 +35,11 @@ const Discover: React.FC = () => {
{ revalidateOnMount: true }
);
const {
data: requests,
error: requestError,
} = useSWR<RequestResultsResponse>(
'/api/v1/request?filter=all&take=10&sort=modified&skip=0',
{ revalidateOnMount: true }
);
const { data: requests, error: requestError } =
useSWR<RequestResultsResponse>(
'/api/v1/request?filter=all&take=10&sort=modified&skip=0',
{ revalidateOnMount: true }
);
return (
<>

View File

@@ -65,9 +65,11 @@ const LanguagePicker: React.FC = () => {
}
defaultValue={locale}
>
{(Object.keys(
availableLanguages
) as (keyof typeof availableLanguages)[]).map((key) => (
{(
Object.keys(
availableLanguages
) as (keyof typeof availableLanguages)[]
).map((key) => (
<option key={key} value={availableLanguages[key].code}>
{availableLanguages[key].display}
</option>

View File

@@ -11,8 +11,8 @@ import useSWR from 'swr';
import { StatusResponse } from '../../../../server/interfaces/api/settingsInterfaces';
const messages = defineMessages({
streamdevelop: 'Overseerr Develop',
streamstable: 'Overseerr Stable',
streamdevelop: 'Jellyseerr Develop',
streamstable: 'Jellyseerr Stable',
outofdate: 'Out of Date',
commitsbehind:
'{commitsBehind} {commitsBehind, plural, one {commit} other {commits}} behind',

View File

@@ -106,9 +106,10 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
`/api/v1/movie/${router.query.movieId}/ratings`
);
const sortedCrew = useMemo(() => sortCrewPriority(data?.credits.crew ?? []), [
data,
]);
const sortedCrew = useMemo(
() => sortCrewPriority(data?.credits.crew ?? []),
[data]
);
if (!data && !error) {
return <LoadingSpinner />;

View File

@@ -164,10 +164,13 @@ const PWAHeader: React.FC<PWAHeaderProps> = ({ applicationTitle }) => {
href="/site.webmanifest"
crossOrigin="use-credentials"
/>
<meta name="application-name" content={applicationTitle ?? 'Overseerr'} />
<meta
name="application-name"
content={applicationTitle ?? 'Jellyseerr'}
/>
<meta
name="apple-mobile-web-app-title"
content={applicationTitle ?? 'Overseerr'}
content={applicationTitle ?? 'Jellyseerr'}
/>
<meta
name="description"

View File

@@ -9,13 +9,13 @@ export const messages = defineMessages({
'Full administrator access. Bypasses all other permission checks.',
users: 'Manage Users',
usersDescription:
'Grant permission to manage Overseerr users. Users with this permission cannot modify users with or grant the Admin privilege.',
'Grant permission to manage Jellyseerr users. Users with this permission cannot modify users with or grant the Admin privilege.',
settings: 'Manage Settings',
settingsDescription:
'Grant permission to modify Overseerr settings. A user must have this permission to grant it to others.',
'Grant permission to modify Jellyseerr settings. A user must have this permission to grant it to others.',
managerequests: 'Manage Requests',
managerequestsDescription:
'Grant permission to manage Overseerr requests. All requests made by a user with this permission will be automatically approved.',
'Grant permission to manage Jellyseerr requests. All requests made by a user with this permission will be automatically approved.',
request: 'Request',
requestDescription: 'Grant permission to request non-4K media.',
requestMovies: 'Request Movies',

View File

@@ -32,12 +32,10 @@ const PersonDetails: React.FC = () => {
);
const [showBio, setShowBio] = useState(false);
const {
data: combinedCredits,
error: errorCombinedCredits,
} = useSWR<PersonCombinedCreditsResponse>(
`/api/v1/person/${router.query.personId}/combined_credits`
);
const { data: combinedCredits, error: errorCombinedCredits } =
useSWR<PersonCombinedCreditsResponse>(
`/api/v1/person/${router.query.personId}/combined_credits`
);
const sortedCast = useMemo(() => {
const grouped = groupBy(combinedCredits?.cast ?? [], 'id');

View File

@@ -1,30 +1,30 @@
import axios from 'axios';
import Link from 'next/link';
import React, { useContext, useState } from 'react';
import { useInView } from 'react-intersection-observer';
import type { MediaRequest } from '../../../../server/entity/MediaRequest';
import {
useIntl,
defineMessages,
FormattedDate,
FormattedRelativeTime,
defineMessages,
useIntl,
} from 'react-intl';
import { useUser, Permission } from '../../../hooks/useUser';
import { LanguageContext } from '../../../context/LanguageContext';
import type { MovieDetails } from '../../../../server/models/Movie';
import type { TvDetails } from '../../../../server/models/Tv';
import { useToasts } from 'react-toast-notifications';
import useSWR from 'swr';
import Badge from '../../Common/Badge';
import StatusBadge from '../../StatusBadge';
import Table from '../../Common/Table';
import {
MediaRequestStatus,
MediaStatus,
} from '../../../../server/constants/media';
import Button from '../../Common/Button';
import axios from 'axios';
import type { MediaRequest } from '../../../../server/entity/MediaRequest';
import type { MovieDetails } from '../../../../server/models/Movie';
import type { TvDetails } from '../../../../server/models/Tv';
import { LanguageContext } from '../../../context/LanguageContext';
import { Permission, useUser } from '../../../hooks/useUser';
import globalMessages from '../../../i18n/globalMessages';
import Link from 'next/link';
import { useToasts } from 'react-toast-notifications';
import Badge from '../../Common/Badge';
import Button from '../../Common/Button';
import Table from '../../Common/Table';
import RequestModal from '../../RequestModal';
import StatusBadge from '../../StatusBadge';
const messages = defineMessages({
seasons: 'Seasons',
@@ -60,12 +60,13 @@ const RequestItem: React.FC<RequestItemProps> = ({
const { data: title, error } = useSWR<MovieDetails | TvDetails>(
inView ? `${url}?language=${locale}` : null
);
const { data: requestData, revalidate, mutate } = useSWR<MediaRequest>(
`/api/v1/request/${request.id}`,
{
initialData: request,
}
);
const {
data: requestData,
revalidate,
mutate,
} = useSWR<MediaRequest>(`/api/v1/request/${request.id}`, {
initialData: request,
});
const [isRetrying, setRetrying] = useState(false);

View File

@@ -97,21 +97,19 @@ const AdvancedRequester: React.FC<AdvancedRequesterProps> = ({
defaultOverrides?.tags ?? []
);
const {
data: serverData,
isValidating,
} = useSWR<ServiceCommonServerWithDetails>(
selectedServer !== null
? `/api/v1/service/${
type === 'movie' ? 'radarr' : 'sonarr'
}/${selectedServer}`
: null,
{
refreshInterval: 0,
refreshWhenHidden: false,
revalidateOnFocus: false,
}
);
const { data: serverData, isValidating } =
useSWR<ServiceCommonServerWithDetails>(
selectedServer !== null
? `/api/v1/service/${
type === 'movie' ? 'radarr' : 'sonarr'
}/${selectedServer}`
: null,
{
refreshInterval: 0,
refreshWhenHidden: false,
revalidateOnFocus: false,
}
);
const [selectedUser, setSelectedUser] = useState<User | null>(
requestUser ?? null

View File

@@ -51,10 +51,8 @@ const MovieRequestModal: React.FC<RequestModalProps> = ({
is4k = false,
}) => {
const [isUpdating, setIsUpdating] = useState(false);
const [
requestOverrides,
setRequestOverrides,
] = useState<RequestOverrides | null>(null);
const [requestOverrides, setRequestOverrides] =
useState<RequestOverrides | null>(null);
const { addToast } = useToasts();
const { data, error } = useSWR<MovieDetails>(`/api/v1/movie/${tmdbId}`, {
revalidateOnMount: true,

View File

@@ -74,10 +74,8 @@ const TvRequestModal: React.FC<RequestModalProps> = ({
(season) => season.seasonNumber
);
const { data, error } = useSWR<TvDetails>(`/api/v1/tv/${tmdbId}`);
const [
requestOverrides,
setRequestOverrides,
] = useState<RequestOverrides | null>(null);
const [requestOverrides, setRequestOverrides] =
useState<RequestOverrides | null>(null);
const [selectedSeasons, setSelectedSeasons] = useState<number[]>(
editRequest ? editingSeasons : []
);

View File

@@ -15,7 +15,7 @@ const messages = defineMessages({
agentenabled: 'Enable Agent',
accessToken: 'Application API Token',
accessTokenTip:
'<ApplicationRegistrationLink>Register an application</ApplicationRegistrationLink> for use with Overseerr',
'<ApplicationRegistrationLink>Register an application</ApplicationRegistrationLink> for use with Jellyseerr',
userToken: 'User or Group Key',
userTokenTip:
'Your 30-character <UsersGroupsLink>user or group identifier</UsersGroupsLink>',
@@ -177,20 +177,19 @@ const NotificationsPushover: React.FC = () => {
<span className="label-required">*</span>
<span className="label-tip">
{intl.formatMessage(messages.accessTokenTip, {
ApplicationRegistrationLink: function ApplicationRegistrationLink(
msg
) {
return (
<a
href="https://pushover.net/api#registration"
className="text-white transition duration-300 hover:underline"
target="_blank"
rel="noreferrer"
>
{msg}
</a>
);
},
ApplicationRegistrationLink:
function ApplicationRegistrationLink(msg) {
return (
<a
href="https://pushover.net/api#registration"
className="text-white transition duration-300 hover:underline"
target="_blank"
rel="noreferrer"
>
{msg}
</a>
);
},
})}
</span>
</label>

View File

@@ -19,7 +19,7 @@ const messages = defineMessages({
'Allow users to also start a chat with your bot and configure their own notifications',
botAPI: 'Bot Authorization Token',
botApiTip:
'<CreateBotLink>Create a bot</CreateBotLink> for use with Overseerr',
'<CreateBotLink>Create a bot</CreateBotLink> for use with Jellyseerr',
chatId: 'Chat ID',
chatIdTip:
'Start a chat with your bot, add <GetIdBotLink>@get_id_bot</GetIdBotLink>, and issue the <code>/my_id</code> command',

View File

@@ -18,7 +18,7 @@ const messages = defineMessages({
toastWebPushTestSuccess: 'Web push test notification sent!',
toastWebPushTestFailed: 'Web push test notification failed to send.',
httpsRequirement:
'In order to receive web push notifications, Overseerr must be served over HTTPS.',
'In order to receive web push notifications, Jellyseerr must be served over HTTPS.',
});
const NotificationsWebPush: React.FC = () => {

View File

@@ -20,11 +20,11 @@ const messages = defineMessages({
currentversion: 'Current Version',
viewchangelog: 'View Changelog',
runningDevelopMessage:
'The latest changes to the <code>develop</code> branch of Overseerr are not shown below. Please see the commit history for this branch on <GithubLink>GitHub</GithubLink> for details.',
'The latest changes to the <code>develop</code> branch of Jellyseerr are not shown below. Please see the commit history for this branch on <GithubLink>GitHub</GithubLink> for details.',
});
const REPO_RELEASE_API =
'https://api.github.com/repos/sct/overseerr/releases?per_page=20';
'https://api.github.com/repos/Fallenbagel/jellyseerr/releases?per_page=20';
interface GitHubRelease {
url: string;
@@ -153,7 +153,7 @@ const Releases: React.FC<ReleasesProps> = ({ currentVersion }) => {
GithubLink: function GithubLink(msg) {
return (
<a
href="https://github.com/sct/overseerr"
href="https://github.com/Fallenbagel/jellyseerr"
target="_blank"
rel="noreferrer"
className="text-yellow-100 underline transition duration-300 hover:text-white"

View File

@@ -16,14 +16,14 @@ import Releases from './Releases';
const messages = defineMessages({
about: 'About',
overseerrinformation: 'Overseerr Information',
overseerrinformation: 'Jellyseerr Information',
version: 'Version',
totalmedia: 'Total Media',
totalrequests: 'Total Requests',
gettingsupport: 'Getting Support',
githubdiscussions: 'GitHub Discussions',
timezone: 'Time Zone',
supportoverseerr: 'Support Overseerr',
supportoverseerr: 'Support Jellyseerr',
helppaycoffee: 'Help Pay for Coffee',
documentation: 'Documentation',
preferredmethod: 'Preferred',
@@ -68,7 +68,7 @@ const SettingsAbout: React.FC = () => {
</p>
<p className="mt-3 text-sm leading-5 md:mt-0 md:ml-6">
<a
href="http://github.com/sct/overseerr"
href="https://github.com/Fallenbagel/jellyseerr"
className="font-medium text-indigo-100 transition duration-150 ease-in-out whitespace-nowrap hover:text-white"
target="_blank"
rel="noreferrer"
@@ -115,32 +115,32 @@ const SettingsAbout: React.FC = () => {
<List title={intl.formatMessage(messages.gettingsupport)}>
<List.Item title={intl.formatMessage(messages.documentation)}>
<a
href="https://docs.overseerr.dev"
href="https://github.com/Fallenbagel/jellyseerr#readme"
target="_blank"
rel="noreferrer"
className="text-indigo-500 hover:underline"
>
https://docs.overseerr.dev
https://github.com/Fallenbagel/jellyseerr#readme
</a>
</List.Item>
<List.Item title={intl.formatMessage(messages.githubdiscussions)}>
<a
href="https://github.com/sct/overseerr/discussions"
href="https://github.com/Fallenbagel/jellyseerr/discussions"
target="_blank"
rel="noreferrer"
className="text-indigo-500 hover:underline"
>
https://github.com/sct/overseerr/discussions
https://github.com/Fallenbagel/jellyseerr/discussions
</a>
</List.Item>
<List.Item title="Discord">
<a
href="https://discord.gg/overseerr"
href="https://discord.gg/XDyAd3AuUV"
target="_blank"
rel="noreferrer"
className="text-indigo-500 hover:underline"
>
https://discord.gg/overseerr
https://discord.gg/XDyAd3AuUV
</a>
</List.Item>
</List>
@@ -151,27 +151,17 @@ const SettingsAbout: React.FC = () => {
title={`${intl.formatMessage(messages.helppaycoffee)} ☕️`}
>
<a
href="https://github.com/sponsors/sct"
href="https://www.buymeacoffee.com/fallen.bagel"
target="_blank"
rel="noreferrer"
className="text-indigo-500 hover:underline"
>
https://github.com/sponsors/sct
https://www.buymeacoffee.com/fallen.bagel
</a>
<Badge className="ml-2">
{intl.formatMessage(messages.preferredmethod)}
</Badge>
</List.Item>
<List.Item title="">
<a
href="https://patreon.com/overseerr"
target="_blank"
rel="noreferrer"
className="text-indigo-500 hover:underline"
>
https://patreon.com/overseerr
</a>
</List.Item>
</List>
</div>
<div className="section">

View File

@@ -1,28 +1,28 @@
import React, { useState } from 'react';
import LoadingSpinner from '../Common/LoadingSpinner';
import type { JellyfinSettings } from '../../../server/lib/settings';
import useSWR from 'swr';
import Button from '../Common/Button';
import axios from 'axios';
import LibraryItem from './LibraryItem';
import Badge from '../Common/Badge';
import React, { useState } from 'react';
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
import useSWR from 'swr';
import type { JellyfinSettings } from '../../../server/lib/settings';
import Badge from '../Common/Badge';
import Button from '../Common/Button';
import LoadingSpinner from '../Common/LoadingSpinner';
import LibraryItem from './LibraryItem';
const messages = defineMessages({
jellyfinsettings: 'Jellyfin Settings',
jellyfinsettingsDescription:
'Configure the settings for your Jellyfin server. Overseerr scans your Jellyfin libraries to see what content is available.',
'Configure the settings for your Jellyfin server. Jellyseerr scans your Jellyfin libraries to see what content is available.',
timeout: 'Timeout',
save: 'Save Changes',
saving: 'Saving…',
jellyfinlibraries: 'Jellyfin Libraries',
jellyfinlibrariesDescription:
'The libraries Overseerr scans for titles. Click the button below if no libraries are listed.',
'The libraries Jellyseerr scans for titles. Click the button below if no libraries are listed.',
syncing: 'Syncing',
syncJellyfin: 'Sync Libraries',
manualscanJellyfin: 'Manual Library Scan',
manualscanDescriptionJellyfin:
"Normally, this will only be run once every 24 hours. Overseerr will check your Jellyfin server's recently added more aggressively. If this is your first time configuring Jellyfin, a one-time full manual library scan is recommended!",
"Normally, this will only be run once every 24 hours. Jellyseerr will check your Jellyfin server's recently added more aggressively. If this is your first time configuring Jellyfin, a one-time full manual library scan is recommended!",
notrunning: 'Not Running',
currentlibrary: 'Current Library: {name}',
librariesRemaining: 'Libraries Remaining: {count}',

View File

@@ -23,7 +23,7 @@ const messages: { [messageName: string]: MessageDescriptor } = defineMessages({
jobsandcache: 'Jobs & Cache',
jobs: 'Jobs',
jobsDescription:
'Overseerr performs certain maintenance tasks as regularly-scheduled jobs, but they can also be manually triggered below. Manually running a job will not alter its schedule.',
'Jellyseerr performs certain maintenance tasks as regularly-scheduled jobs, but they can also be manually triggered below. Manually running a job will not alter its schedule.',
jobname: 'Job Name',
jobtype: 'Type',
nextexecution: 'Next Execution',
@@ -35,7 +35,7 @@ const messages: { [messageName: string]: MessageDescriptor } = defineMessages({
command: 'Command',
cache: 'Cache',
cacheDescription:
'Overseerr caches requests to external API endpoints to optimize performance and avoid making unnecessary API calls.',
'Jellyseerr caches requests to external API endpoints to optimize performance and avoid making unnecessary API calls.',
cacheflushed: '{cachename} cache flushed.',
cachename: 'Cache Name',
cachehits: 'Hits',

View File

@@ -31,7 +31,7 @@ import Transition from '../../Transition';
const messages = defineMessages({
logs: 'Logs',
logsDescription:
'You can also view these logs directly via <code>stdout</code>, or in <code>{configDir}/logs/overseerr.log</code>.',
'You can also view these logs directly via <code>stdout</code>, or in <code>{configDir}/logs/jellyseerr.log</code>.',
time: 'Timestamp',
level: 'Severity',
label: 'Label',

View File

@@ -29,7 +29,7 @@ const messages = defineMessages({
general: 'General',
generalsettings: 'General Settings',
generalsettingsDescription:
'Configure global and default settings for Overseerr.',
'Configure global and default settings for Jellyseerr.',
apikey: 'API Key',
applicationTitle: 'Application Title',
applicationurl: 'Application URL',
@@ -44,7 +44,7 @@ const messages = defineMessages({
hideAvailable: 'Hide Available Media',
csrfProtection: 'Enable CSRF Protection',
csrfProtectionTip:
'Set external API access to read-only (requires HTTPS, and Overseerr must be reloaded for changes to take effect)',
'Set external API access to read-only (requires HTTPS, and Jellyseerr must be reloaded for changes to take effect)',
csrfProtectionHoverTip:
'Do NOT enable this setting unless you understand what you are doing!',
cacheImages: 'Enable Image Caching',
@@ -52,7 +52,7 @@ const messages = defineMessages({
'Optimize and store all images locally (consumes a significant amount of disk space)',
trustProxy: 'Enable Proxy Support',
trustProxyTip:
'Allow Overseerr to correctly register client IP addresses behind a proxy (Overseerr must be reloaded for changes to take effect)',
'Allow Jellyseerr to correctly register client IP addresses behind a proxy (Jellyseerr must be reloaded for changes to take effect)',
validationApplicationTitle: 'You must provide an application title',
validationApplicationUrl: 'You must provide a valid URL',
validationApplicationUrlTrailingSlash: 'URL must not end in a trailing slash',
@@ -306,9 +306,11 @@ const SettingsMain: React.FC = () => {
<div className="form-input">
<div className="form-input-field">
<Field as="select" id="locale" name="locale">
{(Object.keys(
availableLanguages
) as (keyof typeof availableLanguages)[]).map((key) => (
{(
Object.keys(
availableLanguages
) as (keyof typeof availableLanguages)[]
).map((key) => (
<option
key={key}
value={availableLanguages[key].code}

View File

@@ -22,7 +22,7 @@ const messages = defineMessages({
plex: 'Plex',
plexsettings: 'Plex Settings',
plexsettingsDescription:
'Configure the settings for your Plex server. Overseerr scans your Plex libraries to determine content availability.',
'Configure the settings for your Plex server. Jellyseerr scans your Plex libraries to determine content availability.',
serverpreset: 'Server',
serverLocal: 'local',
serverRemote: 'remote',
@@ -43,12 +43,12 @@ const messages = defineMessages({
enablessl: 'Use SSL',
plexlibraries: 'Plex Libraries',
plexlibrariesDescription:
'The libraries Overseerr scans for titles. Set up and save your Plex connection settings, then click the button below if no libraries are listed.',
'The libraries Jellyseerr scans for titles. Set up and save your Plex connection settings, then click the button below if no libraries are listed.',
scanning: 'Syncing…',
scan: 'Sync Libraries',
manualscan: 'Manual Library Scan',
manualscanDescription:
"Normally, this will only be run once every 24 hours. Overseerr will check your Plex server's recently added more aggressively. If this is your first time configuring Plex, a one-time full manual library scan is recommended!",
"Normally, this will only be run once every 24 hours. Jellyseerr will check your Plex server's recently added more aggressively. If this is your first time configuring Plex, a one-time full manual library scan is recommended!",
notrunning: 'Not Running',
currentlibrary: 'Current Library: {name}',
librariesRemaining: 'Libraries Remaining: {count}',

View File

@@ -5,7 +5,7 @@ import { useUser } from '../../hooks/useUser';
import PlexLoginButton from '../PlexLoginButton';
const messages = defineMessages({
welcome: 'Welcome to Overseerr',
welcome: 'Welcome to Jellyseerr',
signinMessage: 'Get started by signing in with your Plex account',
});

View File

@@ -1,14 +1,14 @@
import React, { useEffect, useState } from 'react';
import { useUser } from '../../hooks/useUser';
import PlexLoginButton from '../PlexLoginButton';
import JellyfinLogin from '../Login/JellyfinLogin';
import axios from 'axios';
import React, { useEffect, useState } from 'react';
import { defineMessages, FormattedMessage } from 'react-intl';
import Accordion from '../Common/Accordion';
import { MediaServerType } from '../../../server/constants/server';
import { useUser } from '../../hooks/useUser';
import Accordion from '../Common/Accordion';
import JellyfinLogin from '../Login/JellyfinLogin';
import PlexLoginButton from '../PlexLoginButton';
const messages = defineMessages({
welcome: 'Welcome to Overseerr',
welcome: 'Welcome to Jellyseerr',
signinMessage: 'Get started by signing in',
signinWithJellyfin: 'Use your Jellyfin account',
signinWithPlex: 'Use your Plex account',

View File

@@ -33,10 +33,8 @@ const Setup: React.FC = () => {
const intl = useIntl();
const [isUpdating, setIsUpdating] = useState(false);
const [currentStep, setCurrentStep] = useState(1);
const [
mediaServerSettingsComplete,
setMediaServerSettingsComplete,
] = useState(false);
const [mediaServerSettingsComplete, setMediaServerSettingsComplete] =
useState(false);
const [mediaServerType, setMediaServerType] = useState('');
const router = useRouter();
const { locale } = useLocale();

View File

@@ -1,20 +1,8 @@
import { SparklesIcon } from '@heroicons/react/outline';
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import useSWR from 'swr';
import { StatusResponse } from '../../../server/interfaces/api/settingsInterfaces';
import Modal from '../Common/Modal';
import Transition from '../Transition';
const messages = defineMessages({
newversionavailable: 'Application Update',
newversionDescription:
'Overseerr has been updated! Please click the button below to reload the page.',
reloadOverseerr: 'Reload',
});
const StatusChecker: React.FC = () => {
const intl = useIntl();
const { data, error } = useSWR<StatusResponse>('/api/v1/status', {
refreshInterval: 60 * 1000,
});

View File

@@ -108,9 +108,10 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
`/api/v1/tv/${router.query.tvId}/ratings`
);
const sortedCrew = useMemo(() => sortCrewPriority(data?.credits.crew ?? []), [
data,
]);
const sortedCrew = useMemo(
() => sortCrewPriority(data?.credits.crew ?? []),
[data]
);
if (!data && !error) {
return <LoadingSpinner />;
@@ -197,8 +198,9 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
);
}
const seasonCount = data.seasons.filter((season) => season.seasonNumber !== 0)
.length;
const seasonCount = data.seasons.filter(
(season) => season.seasonNumber !== 0
).length;
if (seasonCount) {
seriesAttributes.push(

View File

@@ -223,9 +223,11 @@ const UserGeneralSettings: React.FC = () => {
availableLanguages[currentSettings.locale].display,
})}
</option>
{(Object.keys(
availableLanguages
) as (keyof typeof availableLanguages)[]).map((key) => (
{(
Object.keys(
availableLanguages
) as (keyof typeof availableLanguages)[]
).map((key) => (
<option
key={key}
value={availableLanguages[key].code}