mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-27 22:01:51 +01:00
fix lint errors
This commit is contained in:
parent
6b9774a210
commit
b42d36c5ac
@ -1,6 +1,10 @@
|
|||||||
import { proxiedFetch } from "../helpers/fetch";
|
import { proxiedFetch } from "../helpers/fetch";
|
||||||
import { registerProvider } from "../helpers/register";
|
import { registerProvider } from "../helpers/register";
|
||||||
import { MWCaptionType, MWStreamQuality, MWStreamType } from "../helpers/streams";
|
import {
|
||||||
|
MWCaptionType,
|
||||||
|
MWStreamQuality,
|
||||||
|
MWStreamType,
|
||||||
|
} from "../helpers/streams";
|
||||||
import { MWMediaType } from "../metadata/types";
|
import { MWMediaType } from "../metadata/types";
|
||||||
|
|
||||||
const netfilmBase = "https://net-film.vercel.app";
|
const netfilmBase = "https://net-film.vercel.app";
|
||||||
@ -40,9 +44,12 @@ registerProvider({
|
|||||||
|
|
||||||
// get stream info from media
|
// get stream info from media
|
||||||
progress(75);
|
progress(75);
|
||||||
const watchInfo = await proxiedFetch<any>(`/api/episode?id=${netfilmId}`, {
|
const watchInfo = await proxiedFetch<any>(
|
||||||
baseURL: netfilmBase,
|
`/api/episode?id=${netfilmId}`,
|
||||||
});
|
{
|
||||||
|
baseURL: netfilmBase,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const data = watchInfo.data;
|
const data = watchInfo.data;
|
||||||
|
|
||||||
@ -56,12 +63,14 @@ registerProvider({
|
|||||||
url: sub.url.replace("https://convert-srt-to-vtt.vercel.app/?url=", ""),
|
url: sub.url.replace("https://convert-srt-to-vtt.vercel.app/?url=", ""),
|
||||||
type: MWCaptionType.SRT,
|
type: MWCaptionType.SRT,
|
||||||
langIso: sub.language,
|
langIso: sub.language,
|
||||||
}))
|
}));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
embeds: [],
|
embeds: [],
|
||||||
stream: {
|
stream: {
|
||||||
streamUrl: source.url.replace("akm-cdn", "aws-cdn").replace("gg-cdn", "aws-cdn"),
|
streamUrl: source.url
|
||||||
|
.replace("akm-cdn", "aws-cdn")
|
||||||
|
.replace("gg-cdn", "aws-cdn"),
|
||||||
quality: qualityMap[source.quality as QualityInMap],
|
quality: qualityMap[source.quality as QualityInMap],
|
||||||
type: MWStreamType.HLS,
|
type: MWStreamType.HLS,
|
||||||
captions: mappedCaptions,
|
captions: mappedCaptions,
|
||||||
@ -124,12 +133,14 @@ registerProvider({
|
|||||||
url: sub.url.replace("https://convert-srt-to-vtt.vercel.app/?url=", ""),
|
url: sub.url.replace("https://convert-srt-to-vtt.vercel.app/?url=", ""),
|
||||||
type: MWCaptionType.SRT,
|
type: MWCaptionType.SRT,
|
||||||
langIso: sub.language,
|
langIso: sub.language,
|
||||||
}))
|
}));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
embeds: [],
|
embeds: [],
|
||||||
stream: {
|
stream: {
|
||||||
streamUrl: source.url.replace("akm-cdn", "aws-cdn").replace("gg-cdn", "aws-cdn"),
|
streamUrl: source.url
|
||||||
|
.replace("akm-cdn", "aws-cdn")
|
||||||
|
.replace("gg-cdn", "aws-cdn"),
|
||||||
quality: qualityMap[source.quality as QualityInMap],
|
quality: qualityMap[source.quality as QualityInMap],
|
||||||
type: MWStreamType.HLS,
|
type: MWStreamType.HLS,
|
||||||
captions: mappedCaptions,
|
captions: mappedCaptions,
|
||||||
|
Loading…
Reference in New Issue
Block a user