mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 18:13:25 +00:00
refactor file tree for remotestream
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Embed, Sourcerer } from '@/providers/base';
|
||||
import { upcloudScraper } from '@/providers/embeds/upcloud';
|
||||
import { flixhqScraper } from '@/providers/sources/flixhq/index';
|
||||
import { remotestreamScraper } from '@/providers/sources/remotestream/index';
|
||||
import { remotestreamScraper } from '@/providers/sources/remotestream';
|
||||
|
||||
export function gatherAllSources(): Array<Sourcerer> {
|
||||
// all sources are gathered here
|
||||
|
@@ -2,9 +2,8 @@ import { flags } from '@/main/targets';
|
||||
import { makeSourcerer } from '@/providers/base';
|
||||
import { NotFoundError } from '@/utils/errors';
|
||||
|
||||
import { remotestreamBase } from './common';
|
||||
const remotestreamBase = `https://fsa.remotestre.am`;
|
||||
|
||||
// TODO tv shows are available in flixHQ, just no scraper yet
|
||||
export const remotestreamScraper = makeSourcerer({
|
||||
id: 'remotestream',
|
||||
name: 'Remote Stream',
|
||||
@@ -16,8 +15,10 @@ export const remotestreamScraper = makeSourcerer({
|
||||
|
||||
const playlistLink = `${remotestreamBase}/Shows/${ctx.media.tmdbId}/${seasonNumber}/${episodeNumber}/${episodeNumber}.m3u8`;
|
||||
|
||||
const streamRes = await ctx.fetcher<Blob>(playlistLink);
|
||||
ctx.progress(30);
|
||||
const streamRes = await ctx.fetcher<Blob>(playlistLink); // TODO support blobs in fetchers
|
||||
if (streamRes.type !== 'application/x-mpegurl') throw new NotFoundError('No watchable item found');
|
||||
ctx.progress(90);
|
||||
|
||||
return {
|
||||
embeds: [],
|
||||
@@ -31,8 +32,10 @@ export const remotestreamScraper = makeSourcerer({
|
||||
async scrapeMovie(ctx) {
|
||||
const playlistLink = `${remotestreamBase}/Movies/${ctx.media.tmdbId}/${ctx.media.tmdbId}.m3u8`;
|
||||
|
||||
ctx.progress(30);
|
||||
const streamRes = await ctx.fetcher<Blob>(playlistLink);
|
||||
if (streamRes.type !== 'application/x-mpegurl') throw new NotFoundError('No watchable item found');
|
||||
ctx.progress(90);
|
||||
|
||||
return {
|
||||
embeds: [],
|
@@ -1 +0,0 @@
|
||||
export const remotestreamBase = `https://fsa.remotestre.am`;
|
Reference in New Issue
Block a user