From 1524a3af39e741adaa417f1ddc07b2a3b479644e Mon Sep 17 00:00:00 2001 From: mrjvs Date: Tue, 15 Aug 2023 20:13:35 +0200 Subject: [PATCH] faster superstream url --- src/backend/providers/superstream/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/providers/superstream/index.ts b/src/backend/providers/superstream/index.ts index 5af85cb9..548c1ec1 100644 --- a/src/backend/providers/superstream/index.ts +++ b/src/backend/providers/superstream/index.ts @@ -248,13 +248,17 @@ registerProvider({ const mappedCaptions = subtitleRes.list .map(convertSubtitles) .filter(Boolean); + + const fasterUrl = new URL(hdQuality.path); + fasterUrl.host = "mp4.shegu.net"; // this domain is faster + return { embeds: [], stream: { quality: qualityMap[ hdQuality.quality as QualityInMap ] as MWStreamQuality, - streamUrl: hdQuality.path, + streamUrl: fasterUrl.toString(), type: MWStreamType.MP4, captions: mappedCaptions, },