mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 11:33:25 +00:00
Fix prettier errors
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { Caption } from "@/providers/captions";
|
||||
import { Subtitle } from "./types";
|
||||
import { Caption, removeDuplicatedLanguages } from '@/providers/captions';
|
||||
|
||||
import { removeDuplicatedLanguages } from "@/providers/captions";
|
||||
import { Subtitle } from './types';
|
||||
|
||||
export async function getCaptions(data: Subtitle[]) {
|
||||
let captions: Caption[] = [];
|
||||
@@ -27,5 +26,5 @@ export async function getCaptions(data: Subtitle[]) {
|
||||
});
|
||||
}
|
||||
captions = removeDuplicatedLanguages(captions);
|
||||
return(captions)
|
||||
return captions;
|
||||
}
|
@@ -1,10 +1,10 @@
|
||||
import { flags } from '@/entrypoint/utils/targets';
|
||||
import { makeSourcerer } from '@/providers/base';
|
||||
import { Caption, removeDuplicatedLanguages } from '@/providers/captions';
|
||||
import { Caption } from '@/providers/captions';
|
||||
import { NotFoundError } from '@/utils/errors';
|
||||
import { getCaptions } from './captions';
|
||||
|
||||
import { Season, Subtitle } from './types';
|
||||
import { getCaptions } from './captions';
|
||||
import { Season } from './types';
|
||||
|
||||
const insertUnitBase = 'https://api.insertunit.ws/';
|
||||
|
||||
@@ -40,10 +40,10 @@ export const insertunitScraper = makeSourcerer({
|
||||
|
||||
if (!currentEpisode?.hls) throw new NotFoundError('No result found');
|
||||
|
||||
let captions: Caption[] = []
|
||||
let captions: Caption[] = [];
|
||||
|
||||
if (currentEpisode.cc != null) {
|
||||
captions = await getCaptions(currentEpisode.cc)
|
||||
captions = await getCaptions(currentEpisode.cc);
|
||||
}
|
||||
|
||||
ctx.progress(95);
|
||||
@@ -82,7 +82,7 @@ export const insertunitScraper = makeSourcerer({
|
||||
|
||||
if (subtitleJSONData != null && subtitleJSONData[1] != null) {
|
||||
const subtitleData = JSON.parse(subtitleJSONData[1]);
|
||||
captions = await getCaptions(subtitleData)
|
||||
captions = await getCaptions(subtitleData);
|
||||
}
|
||||
|
||||
ctx.progress(90);
|
||||
|
Reference in New Issue
Block a user