From d5a775502b7e05bb81893c0f102d50cb4961ca02 Mon Sep 17 00:00:00 2001 From: grafixeyehero Date: Sun, 3 Mar 2024 01:31:35 +0300 Subject: [PATCH] Move itemdto to base models folder --- src/components/cardbuilder/Card/Card.tsx | 2 +- src/components/cardbuilder/Card/CardBox.tsx | 2 +- src/components/cardbuilder/Card/CardContent.tsx | 2 +- src/components/cardbuilder/Card/CardFooterText.tsx | 2 +- src/components/cardbuilder/Card/CardHoverMenu.tsx | 2 +- src/components/cardbuilder/Card/CardImageContainer.tsx | 2 +- src/components/cardbuilder/Card/CardInnerFooter.tsx | 2 +- src/components/cardbuilder/Card/CardOuterFooter.tsx | 2 +- src/components/cardbuilder/Card/CardOverlayButtons.tsx | 2 +- src/components/cardbuilder/Card/Cards.tsx | 2 +- src/components/cardbuilder/Card/cardHelper.ts | 2 +- src/components/cardbuilder/Card/useCard.ts | 2 +- src/components/cardbuilder/Card/useCardImageUrl.ts | 2 +- src/components/cardbuilder/Card/useCardText.tsx | 2 +- src/components/common/DefaultIconText.tsx | 2 +- src/components/common/DefaultName.tsx | 2 +- src/components/common/Media.tsx | 2 +- src/components/indicators/useIndicator.tsx | 2 +- src/components/listview/List/List.tsx | 2 +- src/components/listview/List/ListContent.tsx | 2 +- src/components/listview/List/ListImageContainer.tsx | 2 +- src/components/listview/List/ListItemBody.tsx | 2 +- src/components/listview/List/ListViewUserDataButtons.tsx | 2 +- src/components/listview/List/Lists.tsx | 2 +- src/components/listview/List/listHelper.ts | 2 +- src/components/listview/List/useList.ts | 2 +- src/components/listview/List/useListTextlines.tsx | 2 +- src/components/mediainfo/PrimaryMediaInfo.tsx | 2 +- src/components/mediainfo/usePrimaryMediaInfo.tsx | 2 +- src/elements/emby-itemrefreshindicator/RefreshIndicator.tsx | 2 +- src/types/{itemDto.ts => base/models/item-dto.ts} | 0 src/types/cardOptions.ts | 2 +- src/types/listOptions.ts | 2 +- 33 files changed, 32 insertions(+), 32 deletions(-) rename src/types/{itemDto.ts => base/models/item-dto.ts} (100%) diff --git a/src/components/cardbuilder/Card/Card.tsx b/src/components/cardbuilder/Card/Card.tsx index e1718e6459..2b5314d4cc 100644 --- a/src/components/cardbuilder/Card/Card.tsx +++ b/src/components/cardbuilder/Card/Card.tsx @@ -4,7 +4,7 @@ import CardWrapper from './CardWrapper'; import CardBox from './CardBox'; import type { CardOptions } from 'types/cardOptions'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; interface CardProps { item?: ItemDto; diff --git a/src/components/cardbuilder/Card/CardBox.tsx b/src/components/cardbuilder/Card/CardBox.tsx index 07c8bc2d67..a7fd41c0cd 100644 --- a/src/components/cardbuilder/Card/CardBox.tsx +++ b/src/components/cardbuilder/Card/CardBox.tsx @@ -6,7 +6,7 @@ import CardHoverMenu from './CardHoverMenu'; import CardOuterFooter from './CardOuterFooter'; import CardContent from './CardContent'; import { CardShape } from 'utils/card'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; interface CardBoxProps { diff --git a/src/components/cardbuilder/Card/CardContent.tsx b/src/components/cardbuilder/Card/CardContent.tsx index 8ebeb0cb87..eb8ee8a2eb 100644 --- a/src/components/cardbuilder/Card/CardContent.tsx +++ b/src/components/cardbuilder/Card/CardContent.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import { getDefaultBackgroundClass } from '../cardBuilderUtils'; import CardImageContainer from './CardImageContainer'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; interface CardContentProps { diff --git a/src/components/cardbuilder/Card/CardFooterText.tsx b/src/components/cardbuilder/Card/CardFooterText.tsx index b9bf7bbafd..9dae59b8f6 100644 --- a/src/components/cardbuilder/Card/CardFooterText.tsx +++ b/src/components/cardbuilder/Card/CardFooterText.tsx @@ -3,7 +3,7 @@ import Box from '@mui/material/Box'; import useCardText from './useCardText'; import layoutManager from 'components/layoutManager'; import MoreVertIconButton from '../../common/MoreVertIconButton'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; const shouldShowDetailsMenu = ( diff --git a/src/components/cardbuilder/Card/CardHoverMenu.tsx b/src/components/cardbuilder/Card/CardHoverMenu.tsx index c09e2bad83..b79747034b 100644 --- a/src/components/cardbuilder/Card/CardHoverMenu.tsx +++ b/src/components/cardbuilder/Card/CardHoverMenu.tsx @@ -11,7 +11,7 @@ import FavoriteButton from 'elements/emby-ratingbutton/FavoriteButton'; import PlayArrowIconButton from '../../common/PlayArrowIconButton'; import MoreVertIconButton from '../../common/MoreVertIconButton'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; interface CardHoverMenuProps { diff --git a/src/components/cardbuilder/Card/CardImageContainer.tsx b/src/components/cardbuilder/Card/CardImageContainer.tsx index 8a10b6b330..db609f21e6 100644 --- a/src/components/cardbuilder/Card/CardImageContainer.tsx +++ b/src/components/cardbuilder/Card/CardImageContainer.tsx @@ -7,7 +7,7 @@ import RefreshIndicator from 'elements/emby-itemrefreshindicator/RefreshIndicato import Media from '../../common/Media'; import CardInnerFooter from './CardInnerFooter'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; interface CardImageContainerProps { diff --git a/src/components/cardbuilder/Card/CardInnerFooter.tsx b/src/components/cardbuilder/Card/CardInnerFooter.tsx index 33534e8a9a..e5908adc27 100644 --- a/src/components/cardbuilder/Card/CardInnerFooter.tsx +++ b/src/components/cardbuilder/Card/CardInnerFooter.tsx @@ -1,7 +1,7 @@ import React, { type FC } from 'react'; import classNames from 'classnames'; import CardFooterText from './CardFooterText'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; interface CardInnerFooterProps { diff --git a/src/components/cardbuilder/Card/CardOuterFooter.tsx b/src/components/cardbuilder/Card/CardOuterFooter.tsx index f03dcb8703..3f6380aa9e 100644 --- a/src/components/cardbuilder/Card/CardOuterFooter.tsx +++ b/src/components/cardbuilder/Card/CardOuterFooter.tsx @@ -4,7 +4,7 @@ import { useApi } from 'hooks/useApi'; import { getCardLogoUrl } from './cardHelper'; import CardFooterText from './CardFooterText'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; interface CardOuterFooterProps { diff --git a/src/components/cardbuilder/Card/CardOverlayButtons.tsx b/src/components/cardbuilder/Card/CardOverlayButtons.tsx index 66abd459e3..a00b194587 100644 --- a/src/components/cardbuilder/Card/CardOverlayButtons.tsx +++ b/src/components/cardbuilder/Card/CardOverlayButtons.tsx @@ -7,7 +7,7 @@ import { appRouter } from 'components/router/appRouter'; import PlayArrowIconButton from '../../common/PlayArrowIconButton'; import MoreVertIconButton from '../../common/MoreVertIconButton'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; const sholudShowOverlayPlayButton = ( diff --git a/src/components/cardbuilder/Card/Cards.tsx b/src/components/cardbuilder/Card/Cards.tsx index ca5a52f76e..2ea6863954 100644 --- a/src/components/cardbuilder/Card/Cards.tsx +++ b/src/components/cardbuilder/Card/Cards.tsx @@ -1,7 +1,7 @@ import React, { type FC } from 'react'; import { setCardData } from '../cardBuilder'; import Card from './Card'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; import '../card.scss'; diff --git a/src/components/cardbuilder/Card/cardHelper.ts b/src/components/cardbuilder/Card/cardHelper.ts index ae4ef06f18..ab40841073 100644 --- a/src/components/cardbuilder/Card/cardHelper.ts +++ b/src/components/cardbuilder/Card/cardHelper.ts @@ -17,7 +17,7 @@ import datetime from 'scripts/datetime'; import { isUsingLiveTvNaming } from '../cardBuilderUtils'; import type { NullableNumber, NullableString } from 'types/base/common/shared/types'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; import type { DataAttributes } from 'types/dataAttributes'; import { getDataAttributes } from 'utils/items'; diff --git a/src/components/cardbuilder/Card/useCard.ts b/src/components/cardbuilder/Card/useCard.ts index 80c5dd69b7..6c031afa8d 100644 --- a/src/components/cardbuilder/Card/useCard.ts +++ b/src/components/cardbuilder/Card/useCard.ts @@ -9,7 +9,7 @@ import { getDataAttributes } from 'utils/items'; import { CardShape } from 'utils/card'; import layoutManager from 'components/layoutManager'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; interface UseCardProps { diff --git a/src/components/cardbuilder/Card/useCardImageUrl.ts b/src/components/cardbuilder/Card/useCardImageUrl.ts index 8afec0cab3..4675c1d80b 100644 --- a/src/components/cardbuilder/Card/useCardImageUrl.ts +++ b/src/components/cardbuilder/Card/useCardImageUrl.ts @@ -5,7 +5,7 @@ import { useApi } from 'hooks/useApi'; import { getDesiredAspect } from '../cardBuilderUtils'; import { CardShape } from 'utils/card'; import type { NullableNumber, NullableString } from 'types/base/common/shared/types'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; function getPreferThumbInfo(item: ItemDto, cardOptions: CardOptions) { diff --git a/src/components/cardbuilder/Card/useCardText.tsx b/src/components/cardbuilder/Card/useCardText.tsx index 904777fe85..ff93662841 100644 --- a/src/components/cardbuilder/Card/useCardText.tsx +++ b/src/components/cardbuilder/Card/useCardText.tsx @@ -5,7 +5,7 @@ import layoutManager from 'components/layoutManager'; import CardText from './CardText'; import { getCardTextLines } from './cardHelper'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { CardOptions } from 'types/cardOptions'; const enableRightMargin = ( diff --git a/src/components/common/DefaultIconText.tsx b/src/components/common/DefaultIconText.tsx index f6af526c07..c6ea81b18e 100644 --- a/src/components/common/DefaultIconText.tsx +++ b/src/components/common/DefaultIconText.tsx @@ -3,7 +3,7 @@ import React, { type FC } from 'react'; import Icon from '@mui/material/Icon'; import imageHelper from 'utils/image'; import DefaultName from './DefaultName'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; interface DefaultIconTextProps { item: ItemDto; diff --git a/src/components/common/DefaultName.tsx b/src/components/common/DefaultName.tsx index ba782e1162..44a7829531 100644 --- a/src/components/common/DefaultName.tsx +++ b/src/components/common/DefaultName.tsx @@ -2,7 +2,7 @@ import React, { type FC } from 'react'; import Box from '@mui/material/Box'; import itemHelper from 'components/itemHelper'; import { isUsingLiveTvNaming } from '../cardbuilder/cardBuilderUtils'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; interface DefaultNameProps { item: ItemDto; diff --git a/src/components/common/Media.tsx b/src/components/common/Media.tsx index 598c9ec7a5..99858356c0 100644 --- a/src/components/common/Media.tsx +++ b/src/components/common/Media.tsx @@ -2,7 +2,7 @@ import { BaseItemKind, ImageType } from '@jellyfin/sdk/lib/generated-client'; import React, { type FC } from 'react'; import Image from './Image'; import DefaultIconText from './DefaultIconText'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; interface MediaProps { item: ItemDto; diff --git a/src/components/indicators/useIndicator.tsx b/src/components/indicators/useIndicator.tsx index da5ea537bf..a9ecc12bc8 100644 --- a/src/components/indicators/useIndicator.tsx +++ b/src/components/indicators/useIndicator.tsx @@ -17,7 +17,7 @@ import datetime from 'scripts/datetime'; import itemHelper from 'components/itemHelper'; import AutoTimeProgressBar from 'elements/emby-progressbar/AutoTimeProgressBar'; import type { NullableString } from 'types/base/common/shared/types'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ProgressOptions } from 'types/progressOptions'; const TypeIcon = { diff --git a/src/components/listview/List/List.tsx b/src/components/listview/List/List.tsx index feafd5a04d..8afe3503ba 100644 --- a/src/components/listview/List/List.tsx +++ b/src/components/listview/List/List.tsx @@ -2,7 +2,7 @@ import React, { type FC } from 'react'; import useList from './useList'; import ListContent from './ListContent'; import ListWrapper from './ListWrapper'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ListOptions } from 'types/listOptions'; import '../../mediainfo/mediainfo.scss'; import '../../guide/programs.scss'; diff --git a/src/components/listview/List/ListContent.tsx b/src/components/listview/List/ListContent.tsx index 0cf2160ca6..6dba901dbf 100644 --- a/src/components/listview/List/ListContent.tsx +++ b/src/components/listview/List/ListContent.tsx @@ -10,7 +10,7 @@ import ListItemBody from './ListItemBody'; import ListImageContainer from './ListImageContainer'; import ListViewUserDataButtons from './ListViewUserDataButtons'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ListOptions } from 'types/listOptions'; interface ListContentProps { diff --git a/src/components/listview/List/ListImageContainer.tsx b/src/components/listview/List/ListImageContainer.tsx index b447b2a701..bebe97cb12 100644 --- a/src/components/listview/List/ListImageContainer.tsx +++ b/src/components/listview/List/ListImageContainer.tsx @@ -13,7 +13,7 @@ import { import Media from 'components/common/Media'; import PlayArrowIconButton from 'components/common/PlayArrowIconButton'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ListOptions } from 'types/listOptions'; interface ListImageContainerProps { diff --git a/src/components/listview/List/ListItemBody.tsx b/src/components/listview/List/ListItemBody.tsx index 5152040585..847d46b4de 100644 --- a/src/components/listview/List/ListItemBody.tsx +++ b/src/components/listview/List/ListItemBody.tsx @@ -4,7 +4,7 @@ import Box from '@mui/material/Box'; import useListTextlines from './useListTextlines'; import PrimaryMediaInfo from '../../mediainfo/PrimaryMediaInfo'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ListOptions } from 'types/listOptions'; interface ListItemBodyProps { diff --git a/src/components/listview/List/ListViewUserDataButtons.tsx b/src/components/listview/List/ListViewUserDataButtons.tsx index 97668ed999..8a8b4ce901 100644 --- a/src/components/listview/List/ListViewUserDataButtons.tsx +++ b/src/components/listview/List/ListViewUserDataButtons.tsx @@ -8,7 +8,7 @@ import InfoIconButton from '../../common/InfoIconButton'; import RightIconButtons from '../../common/RightIconButtons'; import MoreVertIconButton from '../../common/MoreVertIconButton'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ListOptions } from 'types/listOptions'; interface ListViewUserDataButtonsProps { diff --git a/src/components/listview/List/Lists.tsx b/src/components/listview/List/Lists.tsx index 1516140635..1215851cc5 100644 --- a/src/components/listview/List/Lists.tsx +++ b/src/components/listview/List/Lists.tsx @@ -5,7 +5,7 @@ import { getIndex } from './listHelper'; import ListGroupHeaderWrapper from './ListGroupHeaderWrapper'; import List from './List'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ListOptions } from 'types/listOptions'; import '../listview.scss'; diff --git a/src/components/listview/List/listHelper.ts b/src/components/listview/List/listHelper.ts index 8386ff3273..d909feb568 100644 --- a/src/components/listview/List/listHelper.ts +++ b/src/components/listview/List/listHelper.ts @@ -3,7 +3,7 @@ import { BaseItemKind, ImageType } from '@jellyfin/sdk/lib/generated-client'; import { getImageApi } from '@jellyfin/sdk/lib/utils/api/image-api'; import globalize from 'scripts/globalize'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ListOptions } from 'types/listOptions'; const sortBySortName = (item: ItemDto): string => { diff --git a/src/components/listview/List/useList.ts b/src/components/listview/List/useList.ts index 75a60c6b54..196721a0dc 100644 --- a/src/components/listview/List/useList.ts +++ b/src/components/listview/List/useList.ts @@ -2,7 +2,7 @@ import classNames from 'classnames'; import { getDataAttributes } from 'utils/items'; import layoutManager from 'components/layoutManager'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ListOptions } from 'types/listOptions'; interface UseListProps { diff --git a/src/components/listview/List/useListTextlines.tsx b/src/components/listview/List/useListTextlines.tsx index da66673a5a..490f94634d 100644 --- a/src/components/listview/List/useListTextlines.tsx +++ b/src/components/listview/List/useListTextlines.tsx @@ -3,7 +3,7 @@ import React from 'react'; import itemHelper from '../../itemHelper'; import datetime from 'scripts/datetime'; import ListTextWrapper from './ListTextWrapper'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { ListOptions } from 'types/listOptions'; function getParentTitle( diff --git a/src/components/mediainfo/PrimaryMediaInfo.tsx b/src/components/mediainfo/PrimaryMediaInfo.tsx index 2978a41683..c68f823b9b 100644 --- a/src/components/mediainfo/PrimaryMediaInfo.tsx +++ b/src/components/mediainfo/PrimaryMediaInfo.tsx @@ -8,7 +8,7 @@ import StarIcons from './StarIcons'; import CaptionMediaInfo from './CaptionMediaInfo'; import CriticRatingMediaInfo from './CriticRatingMediaInfo'; import EndsAt from './EndsAt'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { MiscInfo } from 'types/mediaInfoItem'; interface PrimaryMediaInfoProps { diff --git a/src/components/mediainfo/usePrimaryMediaInfo.tsx b/src/components/mediainfo/usePrimaryMediaInfo.tsx index 6c58609152..d41eea0ec3 100644 --- a/src/components/mediainfo/usePrimaryMediaInfo.tsx +++ b/src/components/mediainfo/usePrimaryMediaInfo.tsx @@ -4,7 +4,7 @@ import datetime from 'scripts/datetime'; import globalize from 'scripts/globalize'; import itemHelper from '../itemHelper'; import type { NullableNumber, NullableString } from 'types/base/common/shared/types'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; import type { MiscInfo } from 'types/mediaInfoItem'; function shouldShowFolderRuntime( diff --git a/src/elements/emby-itemrefreshindicator/RefreshIndicator.tsx b/src/elements/emby-itemrefreshindicator/RefreshIndicator.tsx index 67a65703dc..8d2541f9e3 100644 --- a/src/elements/emby-itemrefreshindicator/RefreshIndicator.tsx +++ b/src/elements/emby-itemrefreshindicator/RefreshIndicator.tsx @@ -10,7 +10,7 @@ import Typography from '@mui/material/Typography'; import Box from '@mui/material/Box'; import { toPercent } from 'utils/number'; import { getCurrentDateTimeLocale } from 'scripts/globalize'; -import type { ItemDto } from 'types/itemDto'; +import type { ItemDto } from 'types/base/models/item-dto'; function CircularProgressWithLabel( props: CircularProgressProps & { value: number } diff --git a/src/types/itemDto.ts b/src/types/base/models/item-dto.ts similarity index 100% rename from src/types/itemDto.ts rename to src/types/base/models/item-dto.ts diff --git a/src/types/cardOptions.ts b/src/types/cardOptions.ts index b18906c0c4..02d10f965f 100644 --- a/src/types/cardOptions.ts +++ b/src/types/cardOptions.ts @@ -5,7 +5,7 @@ import type { BaseItemDtoImageBlurHashes } from '@jellyfin/sdk/lib/generated-cli import type { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type'; import { CardShape } from 'utils/card'; import type { NullableString } from './base/common/shared/types'; -import type { ItemDto } from './itemDto'; +import type { ItemDto } from './base/models/item-dto'; import type { ParentId } from './library'; export interface CardOptions { diff --git a/src/types/listOptions.ts b/src/types/listOptions.ts index b9b5eea80a..e34999e758 100644 --- a/src/types/listOptions.ts +++ b/src/types/listOptions.ts @@ -1,6 +1,6 @@ import { ItemSortBy } from '@jellyfin/sdk/lib/models/api/item-sort-by'; import type { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type'; -import type { ItemDto } from './itemDto'; +import type { ItemDto } from './base/models/item-dto'; export interface ListOptions { items?: ItemDto[] | null; index?: string;