From 436fb2707b4ed03c60e32735ba2a5f68150eae38 Mon Sep 17 00:00:00 2001 From: adrifcastr Date: Wed, 21 Jun 2023 13:38:48 +0200 Subject: [PATCH] update all remaining imports --- src/backend/helpers/provider.ts | 2 +- src/backend/helpers/scrape.ts | 2 +- src/backend/providers/2embed.ts | 2 +- src/backend/providers/flixhq.ts | 2 +- src/backend/providers/gdriveplayer.ts | 2 +- src/backend/providers/gomovies.ts | 2 +- src/backend/providers/hdwatched.ts | 2 +- src/backend/providers/kissasian.ts | 2 +- src/backend/providers/m4ufree.ts | 2 +- src/backend/providers/netfilm.ts | 2 +- src/backend/providers/remotestream.ts | 2 +- src/backend/providers/sflix.ts | 2 +- src/backend/providers/streamflix.ts | 2 +- src/backend/providers/superstream/index.ts | 2 +- src/components/SearchBar.tsx | 2 +- src/components/media/WatchedMediaCard.tsx | 2 +- src/hooks/useScrape.ts | 2 +- src/hooks/useSearchQuery.ts | 2 +- src/setup/App.tsx | 2 +- src/state/bookmark/context.tsx | 2 +- src/state/bookmark/types.ts | 2 +- src/state/watched/context.tsx | 2 +- src/state/watched/migrations/v2.ts | 2 +- src/state/watched/types.ts | 2 +- src/video/components/actions/DividerAction.tsx | 2 +- src/video/components/actions/SeriesSelectionAction.tsx | 2 +- src/video/components/controllers/MetaController.tsx | 2 +- src/video/components/hooks/useCurrentSeriesEpisodeInfo.ts | 2 +- src/video/components/parts/VideoErrorBoundary.tsx | 2 +- src/video/components/parts/VideoPlayerHeader.tsx | 2 +- src/video/components/popouts/EpisodeSelectionPopout.tsx | 5 ++++- src/views/developer/VideoTesterView.tsx | 2 +- src/views/media/MediaView.tsx | 5 ++++- src/views/other/v2Migration.tsx | 2 +- src/views/search/SearchResultsPartial.tsx | 2 +- src/views/search/SearchResultsView.tsx | 2 +- 36 files changed, 42 insertions(+), 36 deletions(-) diff --git a/src/backend/helpers/provider.ts b/src/backend/helpers/provider.ts index 6eed4560..58dea7d4 100644 --- a/src/backend/helpers/provider.ts +++ b/src/backend/helpers/provider.ts @@ -1,7 +1,7 @@ import { MWEmbed } from "./embed"; import { MWStream } from "./streams"; import { DetailedMeta } from "../metadata/getmeta"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; export type MWProviderScrapeResult = { stream?: MWStream; diff --git a/src/backend/helpers/scrape.ts b/src/backend/helpers/scrape.ts index 70e20348..5f1a100c 100644 --- a/src/backend/helpers/scrape.ts +++ b/src/backend/helpers/scrape.ts @@ -3,7 +3,7 @@ import { getEmbedScraperByType, getProviders } from "./register"; import { runEmbedScraper, runProvider } from "./run"; import { MWStream } from "./streams"; import { DetailedMeta } from "../metadata/getmeta"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; interface MWProgressData { type: "embed" | "provider"; diff --git a/src/backend/providers/2embed.ts b/src/backend/providers/2embed.ts index 7cc8938e..507d5a2d 100644 --- a/src/backend/providers/2embed.ts +++ b/src/backend/providers/2embed.ts @@ -8,7 +8,7 @@ import { MWStreamQuality, MWStreamType, } from "../helpers/streams"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; const twoEmbedBase = "https://www.2embed.to"; diff --git a/src/backend/providers/flixhq.ts b/src/backend/providers/flixhq.ts index 376abd08..fd905019 100644 --- a/src/backend/providers/flixhq.ts +++ b/src/backend/providers/flixhq.ts @@ -7,7 +7,7 @@ import { import { mwFetch } from "../helpers/fetch"; import { registerProvider } from "../helpers/register"; import { MWCaption, MWStreamQuality, MWStreamType } from "../helpers/streams"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; const flixHqBase = "https://consumet-api-clone.vercel.app/meta/tmdb"; // instance stolen from streaminal :) diff --git a/src/backend/providers/gdriveplayer.ts b/src/backend/providers/gdriveplayer.ts index 5478b6ed..c184fea7 100644 --- a/src/backend/providers/gdriveplayer.ts +++ b/src/backend/providers/gdriveplayer.ts @@ -3,7 +3,7 @@ import { unpack } from "unpacker"; import { registerProvider } from "@/backend/helpers/register"; import { MWStreamQuality } from "@/backend/helpers/streams"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; import { proxiedFetch } from "../helpers/fetch"; diff --git a/src/backend/providers/gomovies.ts b/src/backend/providers/gomovies.ts index 9e22d095..fdce289b 100644 --- a/src/backend/providers/gomovies.ts +++ b/src/backend/providers/gomovies.ts @@ -1,7 +1,7 @@ import { MWEmbedType } from "../helpers/embed"; import { proxiedFetch } from "../helpers/fetch"; import { registerProvider } from "../helpers/register"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; const gomoviesBase = "https://gomovies.sx"; diff --git a/src/backend/providers/hdwatched.ts b/src/backend/providers/hdwatched.ts index 2096e160..458c3424 100644 --- a/src/backend/providers/hdwatched.ts +++ b/src/backend/providers/hdwatched.ts @@ -2,7 +2,7 @@ import { proxiedFetch } from "../helpers/fetch"; import { MWProviderContext } from "../helpers/provider"; import { registerProvider } from "../helpers/register"; import { MWStreamQuality, MWStreamType } from "../helpers/streams"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; const hdwatchedBase = "https://www.hdwatched.xyz"; diff --git a/src/backend/providers/kissasian.ts b/src/backend/providers/kissasian.ts index 90708970..a95e05ab 100644 --- a/src/backend/providers/kissasian.ts +++ b/src/backend/providers/kissasian.ts @@ -1,7 +1,7 @@ import { MWEmbedType } from "../helpers/embed"; import { proxiedFetch } from "../helpers/fetch"; import { registerProvider } from "../helpers/register"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; const kissasianBase = "https://kissasian.li"; diff --git a/src/backend/providers/m4ufree.ts b/src/backend/providers/m4ufree.ts index 0fe5303d..b9d5aef0 100644 --- a/src/backend/providers/m4ufree.ts +++ b/src/backend/providers/m4ufree.ts @@ -2,7 +2,7 @@ import { MWEmbed, MWEmbedType } from "@/backend/helpers/embed"; import { proxiedFetch } from "../helpers/fetch"; import { registerProvider } from "../helpers/register"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; const HOST = "m4ufree.com"; const URL_BASE = `https://${HOST}`; diff --git a/src/backend/providers/netfilm.ts b/src/backend/providers/netfilm.ts index f7efcfbe..54016733 100644 --- a/src/backend/providers/netfilm.ts +++ b/src/backend/providers/netfilm.ts @@ -5,7 +5,7 @@ import { MWStreamQuality, MWStreamType, } from "../helpers/streams"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; const netfilmBase = "https://net-film.vercel.app"; diff --git a/src/backend/providers/remotestream.ts b/src/backend/providers/remotestream.ts index 02c0f199..093069e8 100644 --- a/src/backend/providers/remotestream.ts +++ b/src/backend/providers/remotestream.ts @@ -1,7 +1,7 @@ import { mwFetch } from "@/backend/helpers/fetch"; import { registerProvider } from "@/backend/helpers/register"; import { MWStreamQuality, MWStreamType } from "@/backend/helpers/streams"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; const remotestreamBase = `https://fsa.remotestre.am`; diff --git a/src/backend/providers/sflix.ts b/src/backend/providers/sflix.ts index 4121046b..2cb1c598 100644 --- a/src/backend/providers/sflix.ts +++ b/src/backend/providers/sflix.ts @@ -1,7 +1,7 @@ import { proxiedFetch } from "../helpers/fetch"; import { registerProvider } from "../helpers/register"; import { MWStreamQuality, MWStreamType } from "../helpers/streams"; -import { MWMediaType } from "../metadata/types"; +import { MWMediaType } from "../metadata/types/mw"; const sflixBase = "https://sflix.video"; diff --git a/src/backend/providers/streamflix.ts b/src/backend/providers/streamflix.ts index 90dd4975..d4488b03 100644 --- a/src/backend/providers/streamflix.ts +++ b/src/backend/providers/streamflix.ts @@ -5,7 +5,7 @@ import { MWStreamQuality, MWStreamType, } from "@/backend/helpers/streams"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; const streamflixBase = "https://us-west2-compute-proxied.streamflix.one"; diff --git a/src/backend/providers/superstream/index.ts b/src/backend/providers/superstream/index.ts index 585d8d8a..75a8b844 100644 --- a/src/backend/providers/superstream/index.ts +++ b/src/backend/providers/superstream/index.ts @@ -13,7 +13,7 @@ import { MWStreamQuality, MWStreamType, } from "@/backend/helpers/streams"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; import { compareTitle } from "@/utils/titleMatch"; const nanoid = customAlphabet("0123456789abcdef", 32); diff --git a/src/components/SearchBar.tsx b/src/components/SearchBar.tsx index 4940cbc7..431de337 100644 --- a/src/components/SearchBar.tsx +++ b/src/components/SearchBar.tsx @@ -1,7 +1,7 @@ import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { MWMediaType, MWQuery } from "@/backend/metadata/types"; +import { MWMediaType, MWQuery } from "@/backend/metadata/types/mw"; import { DropdownButton } from "./buttons/DropdownButton"; import { Icon, Icons } from "./Icon"; diff --git a/src/components/media/WatchedMediaCard.tsx b/src/components/media/WatchedMediaCard.tsx index 346c77b6..ade1612a 100644 --- a/src/components/media/WatchedMediaCard.tsx +++ b/src/components/media/WatchedMediaCard.tsx @@ -1,6 +1,6 @@ import { useMemo } from "react"; -import { MWMediaMeta } from "@/backend/metadata/types"; +import { MWMediaMeta } from "@/backend/metadata/types/mw"; import { useWatchedContext } from "@/state/watched"; import { MediaCard } from "./MediaCard"; diff --git a/src/hooks/useScrape.ts b/src/hooks/useScrape.ts index a375e618..3cffa4ee 100644 --- a/src/hooks/useScrape.ts +++ b/src/hooks/useScrape.ts @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"; import { findBestStream } from "@/backend/helpers/scrape"; import { MWStream } from "@/backend/helpers/streams"; import { DetailedMeta } from "@/backend/metadata/getmeta"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; export interface ScrapeEventLog { type: "provider" | "embed"; diff --git a/src/hooks/useSearchQuery.ts b/src/hooks/useSearchQuery.ts index d431a0d0..cb8c3171 100644 --- a/src/hooks/useSearchQuery.ts +++ b/src/hooks/useSearchQuery.ts @@ -1,7 +1,7 @@ import { useState } from "react"; import { generatePath, useHistory, useRouteMatch } from "react-router-dom"; -import { MWMediaType, MWQuery } from "@/backend/metadata/types"; +import { MWMediaType, MWQuery } from "@/backend/metadata/types/mw"; function getInitialValue(params: { type: string; query: string }) { const type = diff --git a/src/setup/App.tsx b/src/setup/App.tsx index 7be4d581..d0a0887f 100644 --- a/src/setup/App.tsx +++ b/src/setup/App.tsx @@ -8,7 +8,7 @@ import { } from "react-router-dom"; import { convertLegacyUrl } from "@/backend/metadata/getmeta"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; import { BannerContextProvider } from "@/hooks/useBanner"; import { Layout } from "@/setup/Layout"; import { BookmarkContextProvider } from "@/state/bookmark"; diff --git a/src/state/bookmark/context.tsx b/src/state/bookmark/context.tsx index 9dca821f..692d4e76 100644 --- a/src/state/bookmark/context.tsx +++ b/src/state/bookmark/context.tsx @@ -1,6 +1,6 @@ import { ReactNode, createContext, useContext, useMemo } from "react"; -import { MWMediaMeta } from "@/backend/metadata/types"; +import { MWMediaMeta } from "@/backend/metadata/types/mw"; import { useStore } from "@/utils/storage"; import { BookmarkStore } from "./store"; diff --git a/src/state/bookmark/types.ts b/src/state/bookmark/types.ts index 05cb3641..79b92a5c 100644 --- a/src/state/bookmark/types.ts +++ b/src/state/bookmark/types.ts @@ -1,4 +1,4 @@ -import { MWMediaMeta } from "@/backend/metadata/types"; +import { MWMediaMeta } from "@/backend/metadata/types/mw"; export interface BookmarkStoreData { bookmarks: MWMediaMeta[]; diff --git a/src/state/watched/context.tsx b/src/state/watched/context.tsx index 3ce17b2a..661b0ed3 100644 --- a/src/state/watched/context.tsx +++ b/src/state/watched/context.tsx @@ -8,7 +8,7 @@ import { } from "react"; import { DetailedMeta } from "@/backend/metadata/getmeta"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; import { useStore } from "@/utils/storage"; import { VideoProgressStore } from "./store"; diff --git a/src/state/watched/migrations/v2.ts b/src/state/watched/migrations/v2.ts index 8f7a56b6..94f1141b 100644 --- a/src/state/watched/migrations/v2.ts +++ b/src/state/watched/migrations/v2.ts @@ -1,6 +1,6 @@ import { DetailedMeta, getMetaFromId } from "@/backend/metadata/getmeta"; import { searchForMedia } from "@/backend/metadata/search"; -import { MWMediaMeta, MWMediaType } from "@/backend/metadata/types"; +import { MWMediaMeta, MWMediaType } from "@/backend/metadata/types/mw"; import { compareTitle } from "@/utils/titleMatch"; import { WatchedStoreData, WatchedStoreItem } from "../types"; diff --git a/src/state/watched/types.ts b/src/state/watched/types.ts index a3246c38..0854b90b 100644 --- a/src/state/watched/types.ts +++ b/src/state/watched/types.ts @@ -1,4 +1,4 @@ -import { MWMediaMeta } from "@/backend/metadata/types"; +import { MWMediaMeta } from "@/backend/metadata/types/mw"; export interface StoreMediaItem { meta: MWMediaMeta; diff --git a/src/video/components/actions/DividerAction.tsx b/src/video/components/actions/DividerAction.tsx index 5778e16f..3aeaeaef 100644 --- a/src/video/components/actions/DividerAction.tsx +++ b/src/video/components/actions/DividerAction.tsx @@ -1,4 +1,4 @@ -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; import { useVideoPlayerDescriptor } from "@/video/state/hooks"; import { useMeta } from "@/video/state/logic/meta"; diff --git a/src/video/components/actions/SeriesSelectionAction.tsx b/src/video/components/actions/SeriesSelectionAction.tsx index d228b047..9eff0bb6 100644 --- a/src/video/components/actions/SeriesSelectionAction.tsx +++ b/src/video/components/actions/SeriesSelectionAction.tsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; import { Icons } from "@/components/Icon"; import { FloatingAnchor } from "@/components/popout/FloatingAnchor"; import { VideoPlayerIconButton } from "@/video/components/parts/VideoPlayerIconButton"; diff --git a/src/video/components/controllers/MetaController.tsx b/src/video/components/controllers/MetaController.tsx index ee6bc696..25757e25 100644 --- a/src/video/components/controllers/MetaController.tsx +++ b/src/video/components/controllers/MetaController.tsx @@ -1,7 +1,7 @@ import { useEffect } from "react"; import { MWCaption } from "@/backend/helpers/streams"; -import { MWSeasonWithEpisodeMeta } from "@/backend/metadata/types"; +import { MWSeasonWithEpisodeMeta } from "@/backend/metadata/types/mw"; import { useVideoPlayerDescriptor } from "@/video/state/hooks"; import { useControls } from "@/video/state/logic/controls"; import { VideoPlayerMeta } from "@/video/state/types"; diff --git a/src/video/components/hooks/useCurrentSeriesEpisodeInfo.ts b/src/video/components/hooks/useCurrentSeriesEpisodeInfo.ts index 6eb51170..11dfdc88 100644 --- a/src/video/components/hooks/useCurrentSeriesEpisodeInfo.ts +++ b/src/video/components/hooks/useCurrentSeriesEpisodeInfo.ts @@ -1,7 +1,7 @@ import { useMemo } from "react"; import { useTranslation } from "react-i18next"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; import { useMeta } from "@/video/state/logic/meta"; export function useCurrentSeriesEpisodeInfo(descriptor: string) { diff --git a/src/video/components/parts/VideoErrorBoundary.tsx b/src/video/components/parts/VideoErrorBoundary.tsx index 5786aa7a..061bf2b7 100644 --- a/src/video/components/parts/VideoErrorBoundary.tsx +++ b/src/video/components/parts/VideoErrorBoundary.tsx @@ -2,7 +2,7 @@ import { Component } from "react"; import { Trans } from "react-i18next"; import type { ReactNode } from "react-router-dom/node_modules/@types/react/index"; -import { MWMediaMeta } from "@/backend/metadata/types"; +import { MWMediaMeta } from "@/backend/metadata/types/mw"; import { ErrorMessage } from "@/components/layout/ErrorBoundary"; import { Link } from "@/components/text/Link"; import { conf } from "@/setup/config"; diff --git a/src/video/components/parts/VideoPlayerHeader.tsx b/src/video/components/parts/VideoPlayerHeader.tsx index 8c026c49..3a333ee3 100644 --- a/src/video/components/parts/VideoPlayerHeader.tsx +++ b/src/video/components/parts/VideoPlayerHeader.tsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; -import { MWMediaMeta } from "@/backend/metadata/types"; +import { MWMediaMeta } from "@/backend/metadata/types/mw"; import { IconPatch } from "@/components/buttons/IconPatch"; import { Icon, Icons } from "@/components/Icon"; import { BrandPill } from "@/components/layout/BrandPill"; diff --git a/src/video/components/popouts/EpisodeSelectionPopout.tsx b/src/video/components/popouts/EpisodeSelectionPopout.tsx index ce45c318..66c9ae49 100644 --- a/src/video/components/popouts/EpisodeSelectionPopout.tsx +++ b/src/video/components/popouts/EpisodeSelectionPopout.tsx @@ -3,7 +3,10 @@ import { useTranslation } from "react-i18next"; import { useParams } from "react-router-dom"; import { decodeTMDBId, getMetaFromId } from "@/backend/metadata/getmeta"; -import { MWMediaType, MWSeasonWithEpisodeMeta } from "@/backend/metadata/types"; +import { + MWMediaType, + MWSeasonWithEpisodeMeta, +} from "@/backend/metadata/types/mw"; import { IconPatch } from "@/components/buttons/IconPatch"; import { Icon, Icons } from "@/components/Icon"; import { Loading } from "@/components/layout/Loading"; diff --git a/src/views/developer/VideoTesterView.tsx b/src/views/developer/VideoTesterView.tsx index b192cd40..e1b3fa35 100644 --- a/src/views/developer/VideoTesterView.tsx +++ b/src/views/developer/VideoTesterView.tsx @@ -3,7 +3,7 @@ import { Helmet } from "react-helmet"; import { MWStreamQuality, MWStreamType } from "@/backend/helpers/streams"; import { DetailedMeta } from "@/backend/metadata/getmeta"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; import { Button } from "@/components/Button"; import { Dropdown } from "@/components/Dropdown"; import { Navigation } from "@/components/layout/Navigation"; diff --git a/src/views/media/MediaView.tsx b/src/views/media/MediaView.tsx index 7ae1c01b..6e1659a6 100644 --- a/src/views/media/MediaView.tsx +++ b/src/views/media/MediaView.tsx @@ -9,7 +9,10 @@ import { decodeTMDBId, getMetaFromId, } from "@/backend/metadata/getmeta"; -import { MWMediaType, MWSeasonWithEpisodeMeta } from "@/backend/metadata/types"; +import { + MWMediaType, + MWSeasonWithEpisodeMeta, +} from "@/backend/metadata/types/mw"; import { IconPatch } from "@/components/buttons/IconPatch"; import { Icons } from "@/components/Icon"; import { Loading } from "@/components/layout/Loading"; diff --git a/src/views/other/v2Migration.tsx b/src/views/other/v2Migration.tsx index 1334ae26..d0b05e42 100644 --- a/src/views/other/v2Migration.tsx +++ b/src/views/other/v2Migration.tsx @@ -1,7 +1,7 @@ import pako from "pako"; import { useEffect, useState } from "react"; -import { MWMediaType } from "@/backend/metadata/types"; +import { MWMediaType } from "@/backend/metadata/types/mw"; import { conf } from "@/setup/config"; function fromBinary(str: string): Uint8Array { diff --git a/src/views/search/SearchResultsPartial.tsx b/src/views/search/SearchResultsPartial.tsx index 5769338b..e7cfc509 100644 --- a/src/views/search/SearchResultsPartial.tsx +++ b/src/views/search/SearchResultsPartial.tsx @@ -1,6 +1,6 @@ import { useEffect, useMemo, useState } from "react"; -import { MWQuery } from "@/backend/metadata/types"; +import { MWQuery } from "@/backend/metadata/types/mw"; import { useDebounce } from "@/hooks/useDebounce"; import { HomeView } from "./HomeView"; diff --git a/src/views/search/SearchResultsView.tsx b/src/views/search/SearchResultsView.tsx index 331d4f2d..f6507ef1 100644 --- a/src/views/search/SearchResultsView.tsx +++ b/src/views/search/SearchResultsView.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { searchForMedia } from "@/backend/metadata/search"; -import { MWMediaMeta, MWQuery } from "@/backend/metadata/types"; +import { MWMediaMeta, MWQuery } from "@/backend/metadata/types/mw"; import { IconPatch } from "@/components/buttons/IconPatch"; import { Icons } from "@/components/Icon"; import { SectionHeading } from "@/components/layout/SectionHeading";