update all remaining imports

This commit is contained in:
adrifcastr 2023-06-21 13:38:48 +02:00
parent a46cfa43d3
commit 436fb2707b
36 changed files with 42 additions and 36 deletions

View File

@ -1,7 +1,7 @@
import { MWEmbed } from "./embed"; import { MWEmbed } from "./embed";
import { MWStream } from "./streams"; import { MWStream } from "./streams";
import { DetailedMeta } from "../metadata/getmeta"; import { DetailedMeta } from "../metadata/getmeta";
import { MWMediaType } from "../metadata/types"; import { MWMediaType } from "../metadata/types/mw";
export type MWProviderScrapeResult = { export type MWProviderScrapeResult = {
stream?: MWStream; stream?: MWStream;

View File

@ -3,7 +3,7 @@ import { getEmbedScraperByType, getProviders } from "./register";
import { runEmbedScraper, runProvider } from "./run"; import { runEmbedScraper, runProvider } from "./run";
import { MWStream } from "./streams"; import { MWStream } from "./streams";
import { DetailedMeta } from "../metadata/getmeta"; import { DetailedMeta } from "../metadata/getmeta";
import { MWMediaType } from "../metadata/types"; import { MWMediaType } from "../metadata/types/mw";
interface MWProgressData { interface MWProgressData {
type: "embed" | "provider"; type: "embed" | "provider";

View File

@ -8,7 +8,7 @@ import {
MWStreamQuality, MWStreamQuality,
MWStreamType, MWStreamType,
} from "../helpers/streams"; } from "../helpers/streams";
import { MWMediaType } from "../metadata/types"; import { MWMediaType } from "../metadata/types/mw";
const twoEmbedBase = "https://www.2embed.to"; const twoEmbedBase = "https://www.2embed.to";

View File

@ -7,7 +7,7 @@ import {
import { mwFetch } from "../helpers/fetch"; import { mwFetch } from "../helpers/fetch";
import { registerProvider } from "../helpers/register"; import { registerProvider } from "../helpers/register";
import { MWCaption, MWStreamQuality, MWStreamType } from "../helpers/streams"; 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 :) const flixHqBase = "https://consumet-api-clone.vercel.app/meta/tmdb"; // instance stolen from streaminal :)

View File

@ -3,7 +3,7 @@ import { unpack } from "unpacker";
import { registerProvider } from "@/backend/helpers/register"; import { registerProvider } from "@/backend/helpers/register";
import { MWStreamQuality } from "@/backend/helpers/streams"; import { MWStreamQuality } from "@/backend/helpers/streams";
import { MWMediaType } from "@/backend/metadata/types"; import { MWMediaType } from "@/backend/metadata/types/mw";
import { proxiedFetch } from "../helpers/fetch"; import { proxiedFetch } from "../helpers/fetch";

View File

@ -1,7 +1,7 @@
import { MWEmbedType } from "../helpers/embed"; import { MWEmbedType } from "../helpers/embed";
import { proxiedFetch } from "../helpers/fetch"; import { proxiedFetch } from "../helpers/fetch";
import { registerProvider } from "../helpers/register"; import { registerProvider } from "../helpers/register";
import { MWMediaType } from "../metadata/types"; import { MWMediaType } from "../metadata/types/mw";
const gomoviesBase = "https://gomovies.sx"; const gomoviesBase = "https://gomovies.sx";

View File

@ -2,7 +2,7 @@ import { proxiedFetch } from "../helpers/fetch";
import { MWProviderContext } from "../helpers/provider"; import { MWProviderContext } from "../helpers/provider";
import { registerProvider } from "../helpers/register"; import { registerProvider } from "../helpers/register";
import { MWStreamQuality, MWStreamType } from "../helpers/streams"; import { MWStreamQuality, MWStreamType } from "../helpers/streams";
import { MWMediaType } from "../metadata/types"; import { MWMediaType } from "../metadata/types/mw";
const hdwatchedBase = "https://www.hdwatched.xyz"; const hdwatchedBase = "https://www.hdwatched.xyz";

View File

@ -1,7 +1,7 @@
import { MWEmbedType } from "../helpers/embed"; import { MWEmbedType } from "../helpers/embed";
import { proxiedFetch } from "../helpers/fetch"; import { proxiedFetch } from "../helpers/fetch";
import { registerProvider } from "../helpers/register"; import { registerProvider } from "../helpers/register";
import { MWMediaType } from "../metadata/types"; import { MWMediaType } from "../metadata/types/mw";
const kissasianBase = "https://kissasian.li"; const kissasianBase = "https://kissasian.li";

View File

@ -2,7 +2,7 @@ import { MWEmbed, MWEmbedType } from "@/backend/helpers/embed";
import { proxiedFetch } from "../helpers/fetch"; import { proxiedFetch } from "../helpers/fetch";
import { registerProvider } from "../helpers/register"; import { registerProvider } from "../helpers/register";
import { MWMediaType } from "../metadata/types"; import { MWMediaType } from "../metadata/types/mw";
const HOST = "m4ufree.com"; const HOST = "m4ufree.com";
const URL_BASE = `https://${HOST}`; const URL_BASE = `https://${HOST}`;

View File

@ -5,7 +5,7 @@ import {
MWStreamQuality, MWStreamQuality,
MWStreamType, MWStreamType,
} from "../helpers/streams"; } from "../helpers/streams";
import { MWMediaType } from "../metadata/types"; import { MWMediaType } from "../metadata/types/mw";
const netfilmBase = "https://net-film.vercel.app"; const netfilmBase = "https://net-film.vercel.app";

View File

@ -1,7 +1,7 @@
import { mwFetch } from "@/backend/helpers/fetch"; import { mwFetch } from "@/backend/helpers/fetch";
import { registerProvider } from "@/backend/helpers/register"; import { registerProvider } from "@/backend/helpers/register";
import { MWStreamQuality, MWStreamType } from "@/backend/helpers/streams"; 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`; const remotestreamBase = `https://fsa.remotestre.am`;

View File

@ -1,7 +1,7 @@
import { proxiedFetch } from "../helpers/fetch"; import { proxiedFetch } from "../helpers/fetch";
import { registerProvider } from "../helpers/register"; import { registerProvider } from "../helpers/register";
import { MWStreamQuality, MWStreamType } from "../helpers/streams"; import { MWStreamQuality, MWStreamType } from "../helpers/streams";
import { MWMediaType } from "../metadata/types"; import { MWMediaType } from "../metadata/types/mw";
const sflixBase = "https://sflix.video"; const sflixBase = "https://sflix.video";

View File

@ -5,7 +5,7 @@ import {
MWStreamQuality, MWStreamQuality,
MWStreamType, MWStreamType,
} from "@/backend/helpers/streams"; } 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"; const streamflixBase = "https://us-west2-compute-proxied.streamflix.one";

View File

@ -13,7 +13,7 @@ import {
MWStreamQuality, MWStreamQuality,
MWStreamType, MWStreamType,
} from "@/backend/helpers/streams"; } from "@/backend/helpers/streams";
import { MWMediaType } from "@/backend/metadata/types"; import { MWMediaType } from "@/backend/metadata/types/mw";
import { compareTitle } from "@/utils/titleMatch"; import { compareTitle } from "@/utils/titleMatch";
const nanoid = customAlphabet("0123456789abcdef", 32); const nanoid = customAlphabet("0123456789abcdef", 32);

View File

@ -1,7 +1,7 @@
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; 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 { DropdownButton } from "./buttons/DropdownButton";
import { Icon, Icons } from "./Icon"; import { Icon, Icons } from "./Icon";

View File

@ -1,6 +1,6 @@
import { useMemo } from "react"; import { useMemo } from "react";
import { MWMediaMeta } from "@/backend/metadata/types"; import { MWMediaMeta } from "@/backend/metadata/types/mw";
import { useWatchedContext } from "@/state/watched"; import { useWatchedContext } from "@/state/watched";
import { MediaCard } from "./MediaCard"; import { MediaCard } from "./MediaCard";

View File

@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
import { findBestStream } from "@/backend/helpers/scrape"; import { findBestStream } from "@/backend/helpers/scrape";
import { MWStream } from "@/backend/helpers/streams"; import { MWStream } from "@/backend/helpers/streams";
import { DetailedMeta } from "@/backend/metadata/getmeta"; import { DetailedMeta } from "@/backend/metadata/getmeta";
import { MWMediaType } from "@/backend/metadata/types"; import { MWMediaType } from "@/backend/metadata/types/mw";
export interface ScrapeEventLog { export interface ScrapeEventLog {
type: "provider" | "embed"; type: "provider" | "embed";

View File

@ -1,7 +1,7 @@
import { useState } from "react"; import { useState } from "react";
import { generatePath, useHistory, useRouteMatch } from "react-router-dom"; 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 }) { function getInitialValue(params: { type: string; query: string }) {
const type = const type =

View File

@ -8,7 +8,7 @@ import {
} from "react-router-dom"; } from "react-router-dom";
import { convertLegacyUrl } from "@/backend/metadata/getmeta"; 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 { BannerContextProvider } from "@/hooks/useBanner";
import { Layout } from "@/setup/Layout"; import { Layout } from "@/setup/Layout";
import { BookmarkContextProvider } from "@/state/bookmark"; import { BookmarkContextProvider } from "@/state/bookmark";

View File

@ -1,6 +1,6 @@
import { ReactNode, createContext, useContext, useMemo } from "react"; 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 { useStore } from "@/utils/storage";
import { BookmarkStore } from "./store"; import { BookmarkStore } from "./store";

View File

@ -1,4 +1,4 @@
import { MWMediaMeta } from "@/backend/metadata/types"; import { MWMediaMeta } from "@/backend/metadata/types/mw";
export interface BookmarkStoreData { export interface BookmarkStoreData {
bookmarks: MWMediaMeta[]; bookmarks: MWMediaMeta[];

View File

@ -8,7 +8,7 @@ import {
} from "react"; } from "react";
import { DetailedMeta } from "@/backend/metadata/getmeta"; 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 { useStore } from "@/utils/storage";
import { VideoProgressStore } from "./store"; import { VideoProgressStore } from "./store";

View File

@ -1,6 +1,6 @@
import { DetailedMeta, getMetaFromId } from "@/backend/metadata/getmeta"; import { DetailedMeta, getMetaFromId } from "@/backend/metadata/getmeta";
import { searchForMedia } from "@/backend/metadata/search"; 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 { compareTitle } from "@/utils/titleMatch";
import { WatchedStoreData, WatchedStoreItem } from "../types"; import { WatchedStoreData, WatchedStoreItem } from "../types";

View File

@ -1,4 +1,4 @@
import { MWMediaMeta } from "@/backend/metadata/types"; import { MWMediaMeta } from "@/backend/metadata/types/mw";
export interface StoreMediaItem { export interface StoreMediaItem {
meta: MWMediaMeta; meta: MWMediaMeta;

View File

@ -1,4 +1,4 @@
import { MWMediaType } from "@/backend/metadata/types"; import { MWMediaType } from "@/backend/metadata/types/mw";
import { useVideoPlayerDescriptor } from "@/video/state/hooks"; import { useVideoPlayerDescriptor } from "@/video/state/hooks";
import { useMeta } from "@/video/state/logic/meta"; import { useMeta } from "@/video/state/logic/meta";

View File

@ -1,6 +1,6 @@
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { MWMediaType } from "@/backend/metadata/types"; import { MWMediaType } from "@/backend/metadata/types/mw";
import { Icons } from "@/components/Icon"; import { Icons } from "@/components/Icon";
import { FloatingAnchor } from "@/components/popout/FloatingAnchor"; import { FloatingAnchor } from "@/components/popout/FloatingAnchor";
import { VideoPlayerIconButton } from "@/video/components/parts/VideoPlayerIconButton"; import { VideoPlayerIconButton } from "@/video/components/parts/VideoPlayerIconButton";

View File

@ -1,7 +1,7 @@
import { useEffect } from "react"; import { useEffect } from "react";
import { MWCaption } from "@/backend/helpers/streams"; 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 { useVideoPlayerDescriptor } from "@/video/state/hooks";
import { useControls } from "@/video/state/logic/controls"; import { useControls } from "@/video/state/logic/controls";
import { VideoPlayerMeta } from "@/video/state/types"; import { VideoPlayerMeta } from "@/video/state/types";

View File

@ -1,7 +1,7 @@
import { useMemo } from "react"; import { useMemo } from "react";
import { useTranslation } from "react-i18next"; 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"; import { useMeta } from "@/video/state/logic/meta";
export function useCurrentSeriesEpisodeInfo(descriptor: string) { export function useCurrentSeriesEpisodeInfo(descriptor: string) {

View File

@ -2,7 +2,7 @@ import { Component } from "react";
import { Trans } from "react-i18next"; import { Trans } from "react-i18next";
import type { ReactNode } from "react-router-dom/node_modules/@types/react/index"; 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 { ErrorMessage } from "@/components/layout/ErrorBoundary";
import { Link } from "@/components/text/Link"; import { Link } from "@/components/text/Link";
import { conf } from "@/setup/config"; import { conf } from "@/setup/config";

View File

@ -1,6 +1,6 @@
import { useTranslation } from "react-i18next"; 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 { IconPatch } from "@/components/buttons/IconPatch";
import { Icon, Icons } from "@/components/Icon"; import { Icon, Icons } from "@/components/Icon";
import { BrandPill } from "@/components/layout/BrandPill"; import { BrandPill } from "@/components/layout/BrandPill";

View File

@ -3,7 +3,10 @@ import { useTranslation } from "react-i18next";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { decodeTMDBId, getMetaFromId } from "@/backend/metadata/getmeta"; 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 { IconPatch } from "@/components/buttons/IconPatch";
import { Icon, Icons } from "@/components/Icon"; import { Icon, Icons } from "@/components/Icon";
import { Loading } from "@/components/layout/Loading"; import { Loading } from "@/components/layout/Loading";

View File

@ -3,7 +3,7 @@ import { Helmet } from "react-helmet";
import { MWStreamQuality, MWStreamType } from "@/backend/helpers/streams"; import { MWStreamQuality, MWStreamType } from "@/backend/helpers/streams";
import { DetailedMeta } from "@/backend/metadata/getmeta"; 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 { Button } from "@/components/Button";
import { Dropdown } from "@/components/Dropdown"; import { Dropdown } from "@/components/Dropdown";
import { Navigation } from "@/components/layout/Navigation"; import { Navigation } from "@/components/layout/Navigation";

View File

@ -9,7 +9,10 @@ import {
decodeTMDBId, decodeTMDBId,
getMetaFromId, getMetaFromId,
} from "@/backend/metadata/getmeta"; } 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 { IconPatch } from "@/components/buttons/IconPatch";
import { Icons } from "@/components/Icon"; import { Icons } from "@/components/Icon";
import { Loading } from "@/components/layout/Loading"; import { Loading } from "@/components/layout/Loading";

View File

@ -1,7 +1,7 @@
import pako from "pako"; import pako from "pako";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { MWMediaType } from "@/backend/metadata/types"; import { MWMediaType } from "@/backend/metadata/types/mw";
import { conf } from "@/setup/config"; import { conf } from "@/setup/config";
function fromBinary(str: string): Uint8Array { function fromBinary(str: string): Uint8Array {

View File

@ -1,6 +1,6 @@
import { useEffect, useMemo, useState } from "react"; 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 { useDebounce } from "@/hooks/useDebounce";
import { HomeView } from "./HomeView"; import { HomeView } from "./HomeView";

View File

@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { searchForMedia } from "@/backend/metadata/search"; 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 { IconPatch } from "@/components/buttons/IconPatch";
import { Icons } from "@/components/Icon"; import { Icons } from "@/components/Icon";
import { SectionHeading } from "@/components/layout/SectionHeading"; import { SectionHeading } from "@/components/layout/SectionHeading";