From 4eacd9f0c9bcdd4a4d78bacc743808388d355d42 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Sun, 17 Apr 2022 22:13:05 +0100 Subject: [PATCH] Gomostream can return either mp4 or m3u8 --- src/providers/list/gomostream/index.ts | 2 +- src/providers/types.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/providers/list/gomostream/index.ts b/src/providers/list/gomostream/index.ts index 50eb041c..ff23d5a6 100644 --- a/src/providers/list/gomostream/index.ts +++ b/src/providers/list/gomostream/index.ts @@ -88,7 +88,7 @@ export const gomostreamScraper: MWMediaProvider = { const index = unpacked.findIndex((e) => e === '"'); const streamUrl = unpacked.slice(0, index).join(''); - return { url: streamUrl, type: 'mp4', captions: [] }; + return { url: streamUrl, type: streamUrl.split('.').at(-1) || "mp4", captions: [] }; }, async getSeasonDataFromMedia(media: MWPortableMedia): Promise { diff --git a/src/providers/types.ts b/src/providers/types.ts index 4f3795e0..c150e7f7 100644 --- a/src/providers/types.ts +++ b/src/providers/types.ts @@ -20,7 +20,8 @@ export interface MWMediaCaption { } export interface MWMediaStream { url: string; - type: MWMediaStreamType; + // type: MWMediaStreamType; + type: string; captions: MWMediaCaption[]; }