mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-14 09:15:08 +01:00
Merge branch 'dev' into dev
This commit is contained in:
commit
4ad0d53683
@ -4,12 +4,12 @@ import {
|
|||||||
getMWCaptionTypeFromUrl,
|
getMWCaptionTypeFromUrl,
|
||||||
isSupportedSubtitle,
|
isSupportedSubtitle,
|
||||||
} from "../helpers/captions";
|
} from "../helpers/captions";
|
||||||
import { proxiedFetch } 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";
|
||||||
|
|
||||||
const flixHqBase = "https://api.consumet.org/meta/tmdb";
|
const flixHqBase = "https://consumet-api-clone.vercel.app/meta/tmdb"; // instance stolen from streaminal :)
|
||||||
|
|
||||||
type FlixHQMediaType = "Movie" | "TV Series";
|
type FlixHQMediaType = "Movie" | "TV Series";
|
||||||
interface FLIXMediaBase {
|
interface FLIXMediaBase {
|
||||||
@ -59,7 +59,7 @@ registerProvider({
|
|||||||
throw new Error("Unsupported type");
|
throw new Error("Unsupported type");
|
||||||
}
|
}
|
||||||
// search for relevant item
|
// search for relevant item
|
||||||
const searchResults = await proxiedFetch<any>(
|
const searchResults = await mwFetch<any>(
|
||||||
`/${encodeURIComponent(media.meta.title)}`,
|
`/${encodeURIComponent(media.meta.title)}`,
|
||||||
{
|
{
|
||||||
baseURL: flixHqBase,
|
baseURL: flixHqBase,
|
||||||
@ -79,7 +79,7 @@ registerProvider({
|
|||||||
|
|
||||||
// get media info
|
// get media info
|
||||||
progress(25);
|
progress(25);
|
||||||
const mediaInfo = await proxiedFetch<any>(`/info/${foundItem.id}`, {
|
const mediaInfo = await mwFetch<any>(`/info/${foundItem.id}`, {
|
||||||
baseURL: flixHqBase,
|
baseURL: flixHqBase,
|
||||||
params: {
|
params: {
|
||||||
type: flixTypeToMWType(foundItem.type),
|
type: flixTypeToMWType(foundItem.type),
|
||||||
@ -103,7 +103,7 @@ registerProvider({
|
|||||||
}
|
}
|
||||||
if (!episodeId) throw new Error("No watchable item found");
|
if (!episodeId) throw new Error("No watchable item found");
|
||||||
progress(75);
|
progress(75);
|
||||||
const watchInfo = await proxiedFetch<any>(`/watch/${episodeId}`, {
|
const watchInfo = await mwFetch<any>(`/watch/${episodeId}`, {
|
||||||
baseURL: flixHqBase,
|
baseURL: flixHqBase,
|
||||||
params: {
|
params: {
|
||||||
id: mediaInfo.id,
|
id: mediaInfo.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user