Merge remote-tracking branch 'overseerr/develop' into develop

This commit is contained in:
notfakie
2022-09-01 18:11:15 +12:00
473 changed files with 15548 additions and 8433 deletions

View File

@@ -1,4 +1,4 @@
import { Crew } from '../../server/models/common';
import type { Crew } from '@server/models/common';
const priorityJobs = [
'Director',
'Creator',

View File

@@ -1,4 +1,5 @@
import axios, { AxiosError, AxiosResponse } from 'axios';
import type { AxiosError, AxiosResponse } from 'axios';
import axios from 'axios';
interface JellyfinAuthenticationResult {
Id: string;

37
src/utils/polyfillIntl.ts Normal file
View File

@@ -0,0 +1,37 @@
import { shouldPolyfill as shouldPolyfillDisplayNames } from '@formatjs/intl-displaynames/should-polyfill';
import { shouldPolyfill as shouldPolyfillLocale } from '@formatjs/intl-locale/should-polyfill';
import { shouldPolyfill as shouldPolyfillPluralrules } from '@formatjs/intl-pluralrules/should-polyfill';
const polyfillLocale = async () => {
if (shouldPolyfillLocale()) {
await import('@formatjs/intl-locale/polyfill');
}
};
const polyfillPluralRules = async (locale: string) => {
const unsupportedLocale = shouldPolyfillPluralrules(locale);
// This locale is supported
if (!unsupportedLocale) {
return;
}
// Load the polyfill 1st BEFORE loading data
await import('@formatjs/intl-pluralrules/polyfill-force');
await import(`@formatjs/intl-pluralrules/locale-data/${unsupportedLocale}`);
};
const polyfillDisplayNames = async (locale: string) => {
const unsupportedLocale = shouldPolyfillDisplayNames(locale);
// This locale is supported
if (!unsupportedLocale) {
return;
}
// Load the polyfill 1st BEFORE loading data
await import('@formatjs/intl-displaynames/polyfill-force');
await import(`@formatjs/intl-displaynames/locale-data/${unsupportedLocale}`);
};
export const polyfillIntl = async (locale: string) => {
await polyfillLocale();
await polyfillPluralRules(locale);
await polyfillDisplayNames(locale);
};