Merge branch 'dev' into dev

This commit is contained in:
William Oldham
2024-02-29 13:10:36 +00:00
committed by GitHub
3 changed files with 5 additions and 5 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@movie-web/providers", "name": "@movie-web/providers",
"version": "2.2.0", "version": "2.2.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@movie-web/providers", "name": "@movie-web/providers",
"version": "2.2.0", "version": "2.2.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"cheerio": "^1.0.0-rc.12", "cheerio": "^1.0.0-rc.12",

View File

@@ -110,7 +110,7 @@ export const upcloudScraper = makeEmbed({
if (track.kind !== 'captions') return; if (track.kind !== 'captions') return;
const type = getCaptionTypeFromUrl(track.file); const type = getCaptionTypeFromUrl(track.file);
if (!type) return; if (!type) return;
const language = labelToLanguageCode(track.label); const language = labelToLanguageCode(track.label.split(' ')[0]);
if (!language) return; if (!language) return;
captions.push({ captions.push({
id: track.file, id: track.file,

View File

@@ -28,9 +28,9 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
const showPageResult = await ctx.proxiedFetcher<string>(`/${show.fullSlug}`, { const showPageResult = await ctx.proxiedFetcher<string>(`/${show.fullSlug}`, {
baseUrl: ridoMoviesBase, baseUrl: ridoMoviesBase,
}); });
const fullEpisodeSlug = `${show.fullSlug}/season-${ctx.media.season.number}/episode-${ctx.media.episode.number}`; const fullEpisodeSlug = `season-${ctx.media.season.number}/episode-${ctx.media.episode.number}`;
const regexPattern = new RegExp( const regexPattern = new RegExp(
`\\\\"id\\\\":\\\\"(\\d+)\\\\"(?=.*?\\\\\\"fullSlug\\\\\\":\\\\\\"${fullEpisodeSlug}\\\\\\")`, `\\\\"id\\\\":\\\\"(\\d+)\\\\"(?=.*?\\\\\\"fullSlug\\\\\\":\\\\\\"[^"]*${fullEpisodeSlug}[^"]*\\\\\\")`,
'g', 'g',
); );
const matches = [...showPageResult.matchAll(regexPattern)]; const matches = [...showPageResult.matchAll(regexPattern)];