Widen all movie|tv type unions to include music|book across frontend and server

This commit is contained in:
root
2026-04-04 11:50:28 -05:00
parent d8404496b8
commit 6005422cea
14 changed files with 15 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ import { getSettings, MetadataProviderType } from '@server/lib/settings';
import logger from '@server/logger';
export const getMetadataProvider = async (
mediaType: 'movie' | 'tv' | 'anime'
mediaType: 'movie' | 'tv' | 'anime' | 'music' | 'book'
): Promise<TvShowProvider> => {
try {
const settings = await getSettings();

View File

@@ -12,7 +12,7 @@ import { useIntl } from 'react-intl';
interface BlocklistModalProps {
tmdbId: number;
type: 'movie' | 'tv' | 'collection';
type: 'movie' | 'tv' | 'music' | 'book' | 'collection';
show: boolean;
onComplete?: () => void;
onCancel?: () => void;

View File

@@ -50,7 +50,7 @@ const messages = defineMessages('components.Discover.FilterSlideover', {
type FilterSlideoverProps = {
show: boolean;
onClose: () => void;
type: 'movie' | 'tv';
type: 'movie' | 'tv' | 'music' | 'book';
currentFilters: FilterOptions;
};

View File

@@ -48,7 +48,7 @@ const classNames = (...classes: string[]) => {
};
interface CreateIssueModalProps {
mediaType: 'movie' | 'tv';
mediaType: 'movie' | 'tv' | 'music' | 'book';
tmdbId?: number;
onCancel?: () => void;
}

View File

@@ -4,7 +4,7 @@ import { Transition } from '@headlessui/react';
interface IssueModalProps {
show?: boolean;
onCancel: () => void;
mediaType: 'movie' | 'tv';
mediaType: 'movie' | 'tv' | 'music' | 'book';
tmdbId: number;
issueId?: never;
}

View File

@@ -82,7 +82,7 @@ const isMovie = (movie: MovieDetails | TvDetails): movie is MovieDetails => {
};
interface ManageSlideOverProps {
// mediaType: 'movie' | 'tv';
// mediaType: 'movie' | 'tv' | 'music' | 'book';
show?: boolean;
onClose: () => void;
revalidate: () => void;

View File

@@ -14,7 +14,7 @@ const messages = defineMessages('components.QuotaSelector', {
});
interface QuotaSelectorProps {
mediaType: 'movie' | 'tv';
mediaType: 'movie' | 'tv' | 'music' | 'book';
defaultDays?: number;
defaultLimit?: number;
dayOverride?: number;

View File

@@ -45,7 +45,7 @@ interface ButtonOption {
}
interface RequestButtonProps {
mediaType: 'movie' | 'tv';
mediaType: 'movie' | 'tv' | 'music' | 'book';
onUpdate: () => void;
tmdbId: number;
media?: Media;

View File

@@ -50,7 +50,7 @@ export type RequestOverrides = {
};
interface AdvancedRequesterProps {
type: 'movie' | 'tv';
type: 'movie' | 'tv' | 'music' | 'book';
is4k: boolean;
isAnime?: boolean;
defaultOverrides?: RequestOverrides;

View File

@@ -30,7 +30,7 @@ const messages = defineMessages('components.RequestModal.QuotaDisplay', {
interface QuotaDisplayProps {
quota?: QuotaStatus;
mediaType: 'movie' | 'tv';
mediaType: 'movie' | 'tv' | 'music' | 'book';
userOverride?: number | null;
remaining?: number;
overLimit?: number;

View File

@@ -8,7 +8,7 @@ import type { NonFunctionProperties } from '@server/interfaces/api/common';
interface RequestModalProps {
show: boolean;
type: 'movie' | 'tv' | 'collection';
type: 'movie' | 'tv' | 'music' | 'book' | 'collection';
tmdbId: number;
is4k?: boolean;
editRequest?: NonFunctionProperties<MediaRequest>;

View File

@@ -144,7 +144,7 @@ export const CompanySelector = ({
};
type GenreSelectorProps = (BaseSelectorMultiProps | BaseSelectorSingleProps) & {
type: 'movie' | 'tv';
type: 'movie' | 'tv' | 'music' | 'book';
};
export const GenreSelector = ({
@@ -369,7 +369,7 @@ export const KeywordSelector = ({
};
type WatchProviderSelectorProps = {
type: 'movie' | 'tv';
type: 'movie' | 'tv' | 'music' | 'book';
region?: string;
activeProviders?: number[];
onChange: (region: string, value: number[]) => void;

View File

@@ -10,7 +10,7 @@ interface ErrorCardProps {
id: number;
tmdbId: number;
tvdbId?: number;
type: 'movie' | 'tv';
type: 'movie' | 'tv' | 'music' | 'book';
canExpand?: boolean;
}

View File

@@ -9,7 +9,7 @@ export interface TmdbTitleCardProps {
id: number;
tmdbId: number;
tvdbId?: number;
type: 'movie' | 'tv';
type: 'movie' | 'tv' | 'music' | 'book';
canExpand?: boolean;
isAddedToWatchlist?: boolean;
mutateParent?: () => void;