From 03ee2296eb5114cfc807b8937bffb204974fc7ca Mon Sep 17 00:00:00 2001 From: Marouane <57333995+riimuru@users.noreply.github.com> Date: Sun, 2 Jun 2024 00:15:42 -0400 Subject: [PATCH] fix: adapter is not a function error (#622) --- src/routes/meta/anilist.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/meta/anilist.ts b/src/routes/meta/anilist.ts index 97aa1e1c..f5dac79a 100644 --- a/src/routes/meta/anilist.ts +++ b/src/routes/meta/anilist.ts @@ -8,6 +8,7 @@ import { StreamingServers } from '@consumet/extensions/dist/models'; import cache from '../../utils/cache'; import { redis } from '../../main'; import NineAnime from '@consumet/extensions/dist/providers/anime/9anime'; +import Gogoanime from '@consumet/extensions/dist/providers/anime/gogoanime'; const routes = async (fastify: FastifyInstance, options: RegisterOptions) => { fastify.get('/', (_, rp) => { @@ -364,7 +365,8 @@ const generateAnilistMeta = (provider: string | undefined = undefined): Anilist url: process.env.PROXY as string | string[], }); } else { - return new Anilist(undefined, { + // default provider is gogoanime + return new Anilist(new Gogoanime(), { url: process.env.PROXY as string | string[], }); }