pr feedback

This commit is contained in:
Jorrin
2023-12-18 20:48:52 +01:00
parent 9cdc9b1fad
commit cb57e0eef4
3 changed files with 6 additions and 7 deletions

View File

@@ -12,7 +12,7 @@ type DPlayerSourcesResponse = {
export const smashyStreamDScraper = makeEmbed({
id: 'smashystream-d',
name: 'SmashyStream (D)',
rank: 410,
rank: 71,
async scrape(ctx) {
const mainPageRes = await ctx.proxiedFetcher<string>(ctx.url, {
headers: {

View File

@@ -1,6 +1,6 @@
import { flags } from '@/main/targets';
import { makeEmbed } from '@/providers/base';
import { Caption } from '@/providers/captions';
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions';
type FPlayerResponse = {
sourceUrls: string[];
@@ -10,7 +10,7 @@ type FPlayerResponse = {
export const smashyStreamFScraper = makeEmbed({
id: 'smashystream-f',
name: 'SmashyStream (F)',
rank: 400,
rank: 70,
async scrape(ctx) {
const res = await ctx.proxiedFetcher<FPlayerResponse>(ctx.url, {
headers: {
@@ -28,9 +28,8 @@ export const smashyStreamFScraper = makeEmbed({
if (language && url) {
return {
url: url.replace(',', ''),
language,
kind: 'subtitles',
type: url.includes('.vtt') ? 'vtt' : 'srt',
language: labelToLanguageCode(language) ?? '',
type: getCaptionTypeFromUrl(url) ?? 'vtt',
hasCorsRestrictions: false,
};
}

View File

@@ -57,7 +57,7 @@ const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Pr
export const smashyStreamScraper = makeSourcerer({
id: 'smashystream',
name: 'SmashyStream',
rank: 400,
rank: 70,
flags: [flags.NO_CORS],
scrapeMovie: universalScraper,
scrapeShow: universalScraper,