mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-26 17:51:57 +01:00
Merge pull request #408 from movie-web/gone-is-fast-cdn
Goodbye faster cdn
This commit is contained in:
commit
6c8cc63cbc
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "movie-web",
|
"name": "movie-web",
|
||||||
"version": "3.2.0",
|
"version": "3.2.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://movie-web.app",
|
"homepage": "https://movie-web.app",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -18,12 +18,6 @@ import { compareTitle } from "@/utils/titleMatch";
|
|||||||
|
|
||||||
const nanoid = customAlphabet("0123456789abcdef", 32);
|
const nanoid = customAlphabet("0123456789abcdef", 32);
|
||||||
|
|
||||||
function makeFasterUrl(url: string) {
|
|
||||||
const fasterUrl = new URL(url);
|
|
||||||
fasterUrl.host = "mp4.shegu.net"; // this domain is faster
|
|
||||||
return fasterUrl.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
const qualityMap = {
|
const qualityMap = {
|
||||||
"360p": MWStreamQuality.Q360P,
|
"360p": MWStreamQuality.Q360P,
|
||||||
"480p": MWStreamQuality.Q480P,
|
"480p": MWStreamQuality.Q480P,
|
||||||
@ -205,7 +199,7 @@ registerProvider({
|
|||||||
return {
|
return {
|
||||||
embeds: [],
|
embeds: [],
|
||||||
stream: {
|
stream: {
|
||||||
streamUrl: makeFasterUrl(hdQuality.path),
|
streamUrl: hdQuality.path,
|
||||||
quality: qualityMap[hdQuality.quality as QualityInMap],
|
quality: qualityMap[hdQuality.quality as QualityInMap],
|
||||||
type: MWStreamType.MP4,
|
type: MWStreamType.MP4,
|
||||||
captions: mappedCaptions,
|
captions: mappedCaptions,
|
||||||
@ -261,7 +255,7 @@ registerProvider({
|
|||||||
quality: qualityMap[
|
quality: qualityMap[
|
||||||
hdQuality.quality as QualityInMap
|
hdQuality.quality as QualityInMap
|
||||||
] as MWStreamQuality,
|
] as MWStreamQuality,
|
||||||
streamUrl: makeFasterUrl(hdQuality.path),
|
streamUrl: hdQuality.path,
|
||||||
type: MWStreamType.MP4,
|
type: MWStreamType.MP4,
|
||||||
captions: mappedCaptions,
|
captions: mappedCaptions,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user