Widen remaining type unions: StatusBadge, IssueModal, PersonDetails, ExternalLink, discover
This commit is contained in:
@@ -703,7 +703,7 @@ discoverRoutes.get('/trending', async (req, res, next) => {
|
|||||||
const tmdb = createTmdbWithRegionLanguage(req.user);
|
const tmdb = createTmdbWithRegionLanguage(req.user);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const mediaType = (req.query.mediaType as 'all' | 'movie' | 'tv') ?? 'all';
|
const mediaType = (req.query.mediaType as 'all' | 'movie' | 'tv' | 'music' | 'book') ?? 'all';
|
||||||
const timeWindow =
|
const timeWindow =
|
||||||
(req.query.timeWindow as 'day' | 'week') === 'week' ? 'week' : 'day';
|
(req.query.timeWindow as 'day' | 'week') === 'week' ? 'week' : 'day';
|
||||||
const language = (req.query.language as string) ?? req.locale;
|
const language = (req.query.language as string) ?? req.locale;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const messages = defineMessages('components.Discover', {
|
|||||||
timeWindowWeek: 'Weekly',
|
timeWindowWeek: 'Weekly',
|
||||||
});
|
});
|
||||||
|
|
||||||
type MediaType = 'all' | 'movie' | 'tv';
|
type MediaType = 'all' | 'movie' | 'tv' | 'music' | 'book';
|
||||||
|
|
||||||
type TimeWindow = 'day' | 'week';
|
type TimeWindow = 'day' | 'week';
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import useSettings from '@app/hooks/useSettings';
|
|||||||
import { MediaType } from '@server/constants/media';
|
import { MediaType } from '@server/constants/media';
|
||||||
import { MediaServerType } from '@server/constants/server';
|
import { MediaServerType } from '@server/constants/server';
|
||||||
|
|
||||||
type ExternalLinkType = 'movie' | 'tv' | 'person';
|
type ExternalLinkType = 'movie' | 'tv' | 'person' | 'music' | 'book';
|
||||||
|
|
||||||
interface ExternalLinkBlockProps {
|
interface ExternalLinkBlockProps {
|
||||||
mediaType: ExternalLinkType;
|
mediaType: ExternalLinkType;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const messages = defineMessages('components.IssueModal', {
|
|||||||
interface IssueOption {
|
interface IssueOption {
|
||||||
name: MessageDescriptor;
|
name: MessageDescriptor;
|
||||||
issueType: IssueType;
|
issueType: IssueType;
|
||||||
mediaType?: 'movie' | 'tv';
|
mediaType?: 'movie' | 'tv' | 'music' | 'book';
|
||||||
}
|
}
|
||||||
|
|
||||||
export const issueOptions: IssueOption[] = [
|
export const issueOptions: IssueOption[] = [
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const messages = defineMessages('components.PersonDetails', {
|
|||||||
ascharacter: 'as {character}',
|
ascharacter: 'as {character}',
|
||||||
});
|
});
|
||||||
|
|
||||||
type MediaType = 'all' | 'movie' | 'tv';
|
type MediaType = 'all' | 'movie' | 'tv' | 'music' | 'book';
|
||||||
|
|
||||||
const PersonDetails = () => {
|
const PersonDetails = () => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ interface StatusBadgeProps {
|
|||||||
plexUrl?: string;
|
plexUrl?: string;
|
||||||
serviceUrl?: string;
|
serviceUrl?: string;
|
||||||
tmdbId?: number;
|
tmdbId?: number;
|
||||||
mediaType?: 'movie' | 'tv';
|
mediaType?: 'movie' | 'tv' | 'music' | 'book';
|
||||||
title?: string | string[];
|
title?: string | string[];
|
||||||
statusLabelOverride?: string;
|
statusLabelOverride?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user