From 44dca65a966c30c128ea4a6371226db098b164d5 Mon Sep 17 00:00:00 2001 From: Rushil Perera Date: Sat, 6 Dec 2025 09:11:32 -0500 Subject: [PATCH] fix: currentPage not incrementing when loading watched titles --- src/controllers/auth/anilist/index.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/controllers/auth/anilist/index.ts b/src/controllers/auth/anilist/index.ts index 4ab0856..bbdadfb 100644 --- a/src/controllers/auth/anilist/index.ts +++ b/src/controllers/auth/anilist/index.ts @@ -129,11 +129,15 @@ app.openapi(route, async (c) => { let hasNextPage = true; do { - const { mediaList, pageInfo } = await getWatchingTitles( - user.name!, - currentPage++, - aniListToken, - ); + const stub = env.ANILIST_DO.getByName(user.name!); + const { mediaList, pageInfo } = await stub + .getTitles( + user.name!, + currentPage++, + ["CURRENT", "PLANNING", "PAUSED", "REPEATING"], + aniListToken, + ) + .then((data) => data!); if (!mediaList) { break; }