mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #5932 from grafixeyehero/Add-ItemDtoQueryResult-ItemStatus
Add shared ItemStatus and ItemDtoQueryResult Type
This commit is contained in:
commit
d232494a89
24 changed files with 219 additions and 183 deletions
|
@ -1,4 +1,3 @@
|
|||
import type { BaseItemDto } from '@jellyfin/sdk/lib/generated-client';
|
||||
import { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
|
||||
import { ItemFields } from '@jellyfin/sdk/lib/generated-client/models/item-fields';
|
||||
import { ImageType } from '@jellyfin/sdk/lib/generated-client/models/image-type';
|
||||
|
@ -12,12 +11,13 @@ import { appRouter } from 'components/router/appRouter';
|
|||
import SectionContainer from './SectionContainer';
|
||||
import { CardShape } from 'utils/card';
|
||||
import type { ParentId } from 'types/library';
|
||||
import type { ItemDto } from 'types/base/models/item-dto';
|
||||
|
||||
interface GenresSectionContainerProps {
|
||||
parentId: ParentId;
|
||||
collectionType: CollectionType | undefined;
|
||||
itemType: BaseItemKind[];
|
||||
genre: BaseItemDto;
|
||||
genre: ItemDto;
|
||||
}
|
||||
|
||||
const GenresSectionContainer: FC<GenresSectionContainerProps> = ({
|
||||
|
@ -47,7 +47,7 @@ const GenresSectionContainer: FC<GenresSectionContainerProps> = ({
|
|||
|
||||
const { isLoading, data: itemsResult } = useGetItems(getParametersOptions());
|
||||
|
||||
const getRouteUrl = (item: BaseItemDto) => {
|
||||
const getRouteUrl = (item: ItemDto) => {
|
||||
return appRouter.getRouteUrl(item, {
|
||||
context: collectionType,
|
||||
parentId: parentId
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import type { BaseItemDto, SeriesTimerInfoDto } from '@jellyfin/sdk/lib/generated-client';
|
||||
import React, { FC, useCallback } from 'react';
|
||||
import { IconButton } from '@mui/material';
|
||||
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
|
||||
|
@ -8,10 +7,11 @@ import globalize from 'lib/globalize';
|
|||
import { getFiltersQuery } from 'utils/items';
|
||||
import { LibraryViewSettings } from 'types/library';
|
||||
import { LibraryTab } from 'types/libraryTab';
|
||||
import type { ItemDto } from 'types/base/models/item-dto';
|
||||
|
||||
interface PlayAllButtonProps {
|
||||
item: BaseItemDto | null | undefined;
|
||||
items: BaseItemDto[] | SeriesTimerInfoDto[];
|
||||
item: ItemDto | undefined;
|
||||
items: ItemDto[];
|
||||
viewType: LibraryTab;
|
||||
hasFilters: boolean;
|
||||
libraryViewSettings: LibraryViewSettings
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import type { BaseItemDto, SeriesTimerInfoDto } from '@jellyfin/sdk/lib/generated-client';
|
||||
import React, { FC, useCallback } from 'react';
|
||||
import { IconButton } from '@mui/material';
|
||||
import QueueIcon from '@mui/icons-material/Queue';
|
||||
|
||||
import { playbackManager } from 'components/playback/playbackmanager';
|
||||
import globalize from 'lib/globalize';
|
||||
import type { ItemDto } from 'types/base/models/item-dto';
|
||||
|
||||
interface QueueButtonProps {
|
||||
item: BaseItemDto | undefined
|
||||
items: BaseItemDto[] | SeriesTimerInfoDto[];
|
||||
item: ItemDto | undefined
|
||||
items: ItemDto[];
|
||||
hasFilters: boolean;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import type { BaseItemDto, TimerInfoDto } from '@jellyfin/sdk/lib/generated-client';
|
||||
import React, { FC } from 'react';
|
||||
|
||||
import ItemsContainer from 'elements/emby-itemscontainer/ItemsContainer';
|
||||
|
@ -6,11 +5,12 @@ import Scroller from 'elements/emby-scroller/Scroller';
|
|||
import LinkButton from 'elements/emby-button/LinkButton';
|
||||
import Cards from 'components/cardbuilder/Card/Cards';
|
||||
import type { CardOptions } from 'types/cardOptions';
|
||||
import type { ItemDto } from 'types/base/models/item-dto';
|
||||
|
||||
interface SectionContainerProps {
|
||||
url?: string;
|
||||
sectionTitle: string;
|
||||
items: BaseItemDto[] | TimerInfoDto[];
|
||||
items: ItemDto[];
|
||||
cardOptions: CardOptions;
|
||||
reloadItems?: () => void;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import type { BaseItemDto, SeriesTimerInfoDto } from '@jellyfin/sdk/lib/generated-client';
|
||||
import { ItemSortBy } from '@jellyfin/sdk/lib/models/api/item-sort-by';
|
||||
import React, { FC, useCallback } from 'react';
|
||||
import { IconButton } from '@mui/material';
|
||||
|
@ -9,10 +8,11 @@ import globalize from 'lib/globalize';
|
|||
import { getFiltersQuery } from 'utils/items';
|
||||
import { LibraryViewSettings } from 'types/library';
|
||||
import { LibraryTab } from 'types/libraryTab';
|
||||
import type { ItemDto } from 'types/base/models/item-dto';
|
||||
|
||||
interface ShuffleButtonProps {
|
||||
item: BaseItemDto | null | undefined;
|
||||
items: BaseItemDto[] | SeriesTimerInfoDto[];
|
||||
item: ItemDto | undefined;
|
||||
items: ItemDto[];
|
||||
viewType: LibraryTab
|
||||
hasFilters: boolean;
|
||||
libraryViewSettings: LibraryViewSettings
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import {
|
||||
type RecommendationDto,
|
||||
RecommendationType
|
||||
} from '@jellyfin/sdk/lib/generated-client';
|
||||
import type { RecommendationDto } from '@jellyfin/sdk/lib/generated-client/models/recommendation-dto';
|
||||
import { RecommendationType } from '@jellyfin/sdk/lib/generated-client/models/recommendation-type';
|
||||
import React, { type FC } from 'react';
|
||||
import {
|
||||
useGetMovieRecommendations,
|
||||
|
@ -14,6 +12,7 @@ import SectionContainer from './SectionContainer';
|
|||
import { CardShape } from 'utils/card';
|
||||
import type { ParentId } from 'types/library';
|
||||
import type { Section, SectionType } from 'types/sections';
|
||||
import type { ItemDto } from 'types/base/models/item-dto';
|
||||
|
||||
interface SuggestionsSectionViewProps {
|
||||
parentId: ParentId;
|
||||
|
@ -116,7 +115,7 @@ const SuggestionsSectionView: FC<SuggestionsSectionViewProps> = ({
|
|||
// eslint-disable-next-line react/no-array-index-key
|
||||
key={`${recommendation.CategoryId}-${index}`} // use a unique id return value may have duplicate id
|
||||
sectionTitle={getRecommendationTittle(recommendation)}
|
||||
items={recommendation.Items ?? []}
|
||||
items={(recommendation.Items as ItemDto[]) ?? []}
|
||||
cardOptions={{
|
||||
queryKey: ['MovieRecommendations'],
|
||||
shape: CardShape.PortraitOverflow,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue