diff --git a/components/Crunchyroll/ListAnimes.ts b/components/Crunchyroll/ListAnimes.ts index da3e787..2c1adbd 100644 --- a/components/Crunchyroll/ListAnimes.ts +++ b/components/Crunchyroll/ListAnimes.ts @@ -6,7 +6,6 @@ import type { CrunchyAnimeFetch, CrunchyEpisodeFetch, CrunchyEpisodesFetch, Crun export async function searchCrunchy(q: string) { var isProxyActive: boolean | undefined var selectedLanguage: string | undefined - ;(window as any).myAPI.getProxyActive().then((result: boolean) => { isProxyActive = result }) @@ -129,7 +128,6 @@ export async function searchCrunchy(q: string) { export async function getCRSeries(q: string) { var isProxyActive: boolean | undefined var selectedLanguage: string | undefined - ;(window as any).myAPI.getProxyActive().then((result: boolean) => { isProxyActive = result }) @@ -224,7 +222,6 @@ export async function getCRSeries(q: string) { export async function getCREpisodeSeriesID(q: string) { var isProxyActive: boolean | undefined var selectedLanguage: string | undefined - ;(window as any).myAPI.getProxyActive().then((result: boolean) => { isProxyActive = result }) diff --git a/components/Crunchyroll/ListEpisodes.ts b/components/Crunchyroll/ListEpisodes.ts index 50956f3..d3d370e 100644 --- a/components/Crunchyroll/ListEpisodes.ts +++ b/components/Crunchyroll/ListEpisodes.ts @@ -2,9 +2,7 @@ import { crunchyLogin } from './Account' import type { CrunchyEpisodesFetch } from './Types' export async function listEpisodeCrunchy(q: string, geo: string | undefined) { - var selectedLanguage: string | undefined - ;(window as any).myAPI.getDefaultCrunchyrollLanguage().then((result: string) => { selectedLanguage = result }) diff --git a/components/Crunchyroll/ListSeasons.ts b/components/Crunchyroll/ListSeasons.ts index 0489a97..64c3704 100644 --- a/components/Crunchyroll/ListSeasons.ts +++ b/components/Crunchyroll/ListSeasons.ts @@ -3,9 +3,7 @@ import { getProxies } from './Proxy' import type { CrunchySeasonsFetch } from './Types' export async function listSeasonCrunchy(q: string, geo: string | undefined) { - var selectedLanguage: string | undefined - ;(window as any).myAPI.getDefaultCrunchyrollLanguage().then((result: string) => { selectedLanguage = result }) diff --git a/src/api/routes/service/service.service.ts b/src/api/routes/service/service.service.ts index 0d1291f..00d84ed 100644 --- a/src/api/routes/service/service.service.ts +++ b/src/api/routes/service/service.service.ts @@ -276,7 +276,7 @@ async function checkPlaylists() { try { const eps = await Playlist.findAll({ where: { status: 'waiting' } }) - const maxd = await settings.get('DefaultMaxDownloads') as number + const maxd = (await settings.get('DefaultMaxDownloads')) as number if (maxd !== undefined && maxd !== null) { maxDownloading = maxd @@ -306,7 +306,7 @@ async function checkPlaylists() { (e.dataValues.media as CrunchyEpisode).episode_number, (e.dataValues.media as CrunchyEpisode).episode, e.dataValues.quality, - e.dataValues.qualityaudio ? e.dataValues.qualityaudio-1 : 0, + e.dataValues.qualityaudio ? e.dataValues.qualityaudio - 1 : 0, e.dataValues.dir, e.dataValues.format, (e.dataValues.media as CrunchyEpisode).geo diff --git a/src/api/services/chapter.ts b/src/api/services/chapter.ts index 20fb58e..f97ac70 100644 --- a/src/api/services/chapter.ts +++ b/src/api/services/chapter.ts @@ -45,19 +45,19 @@ export async function createChapterFile(rawchapters: VideoMetadata, dir: string, chapters.push(``) if (rawchapters.intro && rawchapters.intro.type && rawchapters.intro.start && rawchapters.intro.end) { - chapters.push(...await createChapter(rawchapters.intro, format, 'Intro')); + chapters.push(...(await createChapter(rawchapters.intro, format, 'Intro'))) } if (rawchapters.credits && rawchapters.credits.type && rawchapters.credits.start && rawchapters.credits.end) { - chapters.push(...await createChapter(rawchapters.credits, format, 'Credits')); + chapters.push(...(await createChapter(rawchapters.credits, format, 'Credits'))) } if (rawchapters.preview && rawchapters.preview.type && rawchapters.preview.start && rawchapters.preview.end) { - chapters.push(...await createChapter(rawchapters.preview, format, 'Preview')); + chapters.push(...(await createChapter(rawchapters.preview, format, 'Preview'))) } if (rawchapters.recap && rawchapters.recap.type && rawchapters.recap.start && rawchapters.recap.end) { - chapters.push(...await createChapter(rawchapters.recap, format, 'Recap')); + chapters.push(...(await createChapter(rawchapters.recap, format, 'Recap'))) } try {