Browse Source

Gomostream can return either mp4 or m3u8

pull/60/head
James Hawkins 3 years ago
parent
commit
4eacd9f0c9
  1. 2
      src/providers/list/gomostream/index.ts
  2. 3
      src/providers/types.ts

2
src/providers/list/gomostream/index.ts

@ -88,7 +88,7 @@ export const gomostreamScraper: MWMediaProvider = {
const index = unpacked.findIndex((e) => e === '"'); const index = unpacked.findIndex((e) => e === '"');
const streamUrl = unpacked.slice(0, index).join(''); 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<MWMediaSeasons> { async getSeasonDataFromMedia(media: MWPortableMedia): Promise<MWMediaSeasons> {

3
src/providers/types.ts

@ -20,7 +20,8 @@ export interface MWMediaCaption {
} }
export interface MWMediaStream { export interface MWMediaStream {
url: string; url: string;
type: MWMediaStreamType; // type: MWMediaStreamType;
type: string;
captions: MWMediaCaption[]; captions: MWMediaCaption[];
} }

Loading…
Cancel
Save