diff --git a/.eslintrc.js b/.eslintrc.js index e8ede63..7fa3236 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,7 +23,7 @@ module.exports = { 'no-bitwise': 'off', 'no-underscore-dangle': 'off', '@typescript-eslint/no-explicit-any': 'off', - 'no-console': 'off', + 'no-console': ['error', { allow: ['warn', 'error'] }], '@typescript-eslint/no-this-alias': 'off', 'import/prefer-default-export': 'off', '@typescript-eslint/no-empty-function': 'off', diff --git a/package.json b/package.json index b6a09e9..b90b41c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@movie-web/providers", - "version": "2.2.3", + "version": "2.2.4", "description": "Package that contains all the providers of movie-web", "main": "./lib/index.umd.js", "types": "./lib/index.d.ts", diff --git a/src/dev-cli/logging.ts b/src/dev-cli/logging.ts index 1a519f4..5495f1d 100644 --- a/src/dev-cli/logging.ts +++ b/src/dev-cli/logging.ts @@ -1,5 +1,7 @@ import { inspect } from 'node:util'; export function logDeepObject(object: Record) { + // This is the dev cli, so we can use console.log + // eslint-disable-next-line no-console console.log(inspect(object, { showHidden: false, depth: null, colors: true })); } diff --git a/src/dev-cli/scraper.ts b/src/dev-cli/scraper.ts index 39f75f6..bc32af2 100644 --- a/src/dev-cli/scraper.ts +++ b/src/dev-cli/scraper.ts @@ -41,6 +41,8 @@ async function runBrowserScraping( args: ['--no-sandbox', '--disable-setuid-sandbox'], }); const page = await browser.newPage(); + // This is the dev cli, so we can use console.log + // eslint-disable-next-line no-console page.on('console', (message) => console.log(`${message.type().slice(0, 3).toUpperCase()} ${message.text()}`)); await page.goto(server.resolvedUrls.local[0]); await page.waitForFunction('!!window.scrape', { timeout: 5000 }); diff --git a/src/providers/sources/hdrezka/utils.ts b/src/providers/sources/hdrezka/utils.ts index f8c7589..a88c5a3 100644 --- a/src/providers/sources/hdrezka/utils.ts +++ b/src/providers/sources/hdrezka/utils.ts @@ -52,7 +52,6 @@ function parseVideoLinks(inputString?: string): FileBasedStream['qualities'] { const numericQualityMatch = qualityText.match(/(\d+p)/); const quality = numericQualityMatch ? numericQualityMatch[1] : 'Unknown'; - console.log(quality, mp4Url); const validQuality = getValidQualityFromString(quality); result[validQuality] = { type: 'mp4', url: mp4Url }; } diff --git a/src/providers/sources/remotestream.ts b/src/providers/sources/remotestream.ts index fa2efc4..ab884ab 100644 --- a/src/providers/sources/remotestream.ts +++ b/src/providers/sources/remotestream.ts @@ -10,6 +10,7 @@ const referer = 'https://remotestre.am/'; export const remotestreamScraper = makeSourcerer({ id: 'remotestream', name: 'Remote Stream', + disabled: true, rank: 55, flags: [flags.CORS_ALLOWED], async scrapeShow(ctx) { diff --git a/src/providers/sources/vidsrcto/index.ts b/src/providers/sources/vidsrcto/index.ts index c6c9fb5..cd6076e 100644 --- a/src/providers/sources/vidsrcto/index.ts +++ b/src/providers/sources/vidsrcto/index.ts @@ -11,11 +11,11 @@ const vidSrcToBase = 'https://vidsrc.to'; const referer = `${vidSrcToBase}/`; const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Promise => { - const imdbId = ctx.media.imdbId; + const mediaId = ctx.media.imdbId ?? ctx.media.tmdbId; const url = ctx.media.type === 'movie' - ? `/embed/movie/${imdbId}` - : `/embed/tv/${imdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`; + ? `/embed/movie/${mediaId}` + : `/embed/tv/${mediaId}/${ctx.media.season.number}/${ctx.media.episode.number}`; const mainPage = await ctx.proxiedFetcher(url, { baseUrl: vidSrcToBase, headers: {